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

Content added Content deleted
(→‎{{header|Wren}}: Now uses new Date.fromJulian method.)
Line 619: Line 619:
=={{header|EasyLang}}==
=={{header|EasyLang}}==
<syntaxhighlight lang="easylang">
<syntaxhighlight lang="easylang">
func dayOfTheWeek year month day . result .
proc dayOfTheWeek year month day . result .
# Based on Conway's doomsday algorithm
# Based on Conway's doomsday algorithm
# 1. Calculate the doomsday for the century
# 1. Calculate the doomsday for the century
Line 685: Line 685:
result = (januaryOne + NthDay - 1) mod 7
result = (januaryOne + NthDay - 1) mod 7
.
.
func numberToDay n . day$ .
proc numberToDay n . day$ .
if n = 0
if n = 0
day$ = "Sunday"
day$ = "Sunday"