Doomsday rule: Difference between revisions

m
m (→‎{{header|Haskell}}: HLint, Ormolu)
m (→‎{{header|Haskell}}: yyyy-mm-dd)
Line 557:
instance Show Date where
show Date {year = y, month = m, day = d} =
printf "%2d/4d-%d/02d-%4d02d" y m d y
 
leap :: Int -> Bool
Line 596:
main = putStr $ unlines $ map dateAndDay dates</lang>
{{out}}
<pre> 1/6/1800-01-06: Monday
3/29/1875-03-29: Monday
12/7/1915-12-07: Tuesday
1970-12/-23/1970: Wednesday
5/14/2043-05-14: Thursday
2/12/2077-02-12: Friday
4/2/2101-04-02: Saturday</pre>
 
=={{header|Java}}==
9,655

edits