Day of the week: Difference between revisions
Content added Content deleted
(Added R code) |
(→{{header|D}}: add implementation) |
||
Line 254: | Line 254: | ||
25 Dec 2112 |
25 Dec 2112 |
||
25 Dec 2118</pre> |
25 Dec 2118</pre> |
||
=={{header|D}}== |
|||
I'm sure this can be done better. If anyone wants to take the time, please improve it. |
|||
<lang d> |
|||
import std.date; |
|||
import std.stdio; |
|||
void main() { |
|||
for(long year = 2008;year<=2121;year++) |
|||
if (0 == WeekDay(parse("December 25, "~std.string.toString(year)))) |
|||
writefln("Christmas comes on a sunday in %d",year); |
|||
} |
|||
</lang> |
|||
=={{header|Forth}}== |
=={{header|Forth}}== |