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

Content added Content deleted
(Ada version)
(add FreeBASIC)
Line 125: Line 125:
In 2245, New Years is on a Wednesday, and Christmas is on a Thursday.
In 2245, New Years is on a Wednesday, and Christmas is on a Thursday.
In 2393, New Years is on a Friday, and Christmas is on a Saturday.
In 2393, New Years is on a Friday, and Christmas is on a Saturday.
</pre>

=={{header|FreeBASIC}}==
<lang freebasic>#include "vbcompat.bi" 'contains functions for dealing with dates and times
#include "string.bi" 'contains functions for formatting text strings

dim as double christmas = DateSerial(2021, 12, 25) 'enter the dates of the two holidays
dim as double newyears = DateSerial(2022, 01, 01)

print "Christmas Day 2021 is on a "; format(christmas,"dddd")
print "New Year's Day 2022 is on a "; format(newyears, "dddd")</lang>
{{out}}<pre>
Christmas Day 2021 is on a Saturday
New Year's Day 2022 is on a Saturday
</pre>
</pre>