Day of the week: Difference between revisions
Content deleted Content added
{{omit from|PARI/GP|No standard date handling library}} |
|||
Line 354: | Line 354: | ||
=={{header|D}}== |
=={{header|D}}== |
||
⚫ | |||
I'm sure this can be done better. If anyone wants to take the time, please improve it. |
|||
⚫ | |||
import std.stdio; |
|||
void main() { |
void main() { |
||
for( |
for (int year = 2008; year <= 2121; year++) |
||
if (0 == |
if (0 == weekDay(parse("December 25, " ~ to!string(year)))) |
||
writefln("Christmas comes on a sunday in %d",year); |
writefln("Christmas comes on a sunday in %d", year); |
||
}</lang> |
}</lang> |
||
=={{header|Delphi}}== |
=={{header|Delphi}}== |