Day of the week of Christmas and New Year: Difference between revisions
Day of the week of Christmas and New Year (view source)
Revision as of 15:53, 1 December 2021
, 2 years agoRealize in F#
(→{{header|Ring}}: removed external library dependency, removed hard-coded date, this routine will now automatically work every year without having to modify it) |
(Realize in F#) |
||
Line 57:
</pre>
=={{header|F_Sharp|F#}}==
<lang fsharp>
// Show day of week for Christmas Day, 2021 and New Year's Day, 2022. Nigel Galloway: December 1st., 2021
printfn $"Christmas Day 2021 is a %s{string(System.DateTime(2021,12,25).DayOfWeek)}. New Years Day 2022 is a %s{string(System.DateTime(2022,1,1).DayOfWeek)}."
</lang>
{{out}}
<pre>
Christmas Day 2021 is a Saturday. New Years Day 2022 is a Saturday.
</pre>
=={{header|Factor}}==
{{works with|Factor|0.99 2021-06-02}}
|