Day of the week: Difference between revisions

Content added Content deleted
Line 2,558: Line 2,558:
=={{header|Nanoquery}}==
=={{header|Nanoquery}}==
<lang Nanoquery>import Nanoquery.Util
<lang Nanoquery>import Nanoquery.Util

// loop through the years 2008 through 2121
// loop through the years 2008 through 2121
for ($year = 2008) ($year < 2122) ($year = $year + 1)
for year in range(2008, 2121)
if (new(Date,"12/25/" + str($year)).getDayOfWeek() = "Sunday")
if (new(Date,"12/25/" + str(year)).getDayOfWeek() = "Sunday")
println "In " + $year + ", December 25th is a Sunday."
println "In " + year + ", December 25th is a Sunday."
end if
end if
end for</lang>
end for</lang>