Day of the week of Christmas and New Year: Difference between revisions

m
Line 619:
=={{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 683:
NthDay += day
# 6. Finally, calculate the day of the week
result =return (januaryOne + NthDay - 1) mod 7
.
proc numberToDay n . day$ .
Line 702:
.
.
callnumberToDay (dayOfTheWeek 2021 12 25) resultday$
call numberToDay result day$
print "2021-12-25 is on " & day$
callnumberToDay (dayOfTheWeek 2022 1 1) resultday$
call numberToDay result day$
print "2022-1-1 is on " & day$
</syntaxhighlight>
2,022

edits