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

Added 11l
(Fix Python solution)
(Added 11l)
Line 4:
<br>
Determine programatically and show on this page on what weekday Christmas Day, 2021 and New Year's Day, 2022 will fall or did fall.
 
=={{header|11l}}==
{{trans|Python}}
 
<lang 11l>V weekDays = [‘Sunday’, ‘Monday’, ‘Tuesday’, ‘Wednesday’, ‘Thursday’, ‘Friday’, ‘Saturday’]
V thisXMas = Time(2021, 12, 25)
V thisXMasDay = Int(thisXMas.strftime(‘%w’))
V thisXMasDayAsString = weekDays[thisXMasDay]
print(‘This year's Christmas is on a ’thisXMasDayAsString)
 
V nextNewYear = Time(2022, 1, 1)
V nextNewYearDay = Int(nextNewYear.strftime(‘%w’))
V nextNewYearDayAsString = weekDays[nextNewYearDay]
print(‘Next new year is on a ’nextNewYearDayAsString)</lang>
 
{{out}}
<pre>
This year's Christmas is on a Saturday
Next new year is on a Saturday
</pre>
 
=={{header|Ada}}==
1,480

edits