Day of the week: Difference between revisions

m
Line 2,125:
=={{header|EasyLang}}==
<syntaxhighlight lang="easylang">
procfunc dayOfTheWeek year month day . result .
# Based on Conway's doomsday algorithm
# 1. Calculate the doomsday for the century
Line 2,189:
NthDay += day
# 6. Finally, calculate the day of the week
result =return (januaryOne + NthDay - 1) mod 7
.
for i = 2008 to 2121
callif dayOfTheWeek i 12 25 result= 0
if result = 0
print "Christmas in " & i & " is on Sunday"
.
1,983

edits