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

Content added Content deleted
Line 41: Line 41:
println("New Years Day 2022: ", Dates.format(DateTime(2022, 1, 1), "E, U d, Y")) # "New Years Day 2022: Saturday, January 1, 2022"
println("New Years Day 2022: ", Dates.format(DateTime(2022, 1, 1), "E, U d, Y")) # "New Years Day 2022: Saturday, January 1, 2022"
</lang>
</lang>

=={{header|Perl}}==
<lang perl>#!/usr/bin/perl

use strict; # https://rosettacode.org/wiki/What_weekdays_will_Christmas_and_New_Year
use warnings;
use Time::Local;

for (
['Christmas 2021', 25, 11, 2021 ],
['New Years 2022', 1, 0, 2022 ],
)
{
print "$_->[0] ", qw( Sunday Monday Tuesday Wednesday Thursday Fridat Saturday )
[(localtime timelocal(0, 0, 12, @{$_}[1..3]))[6]], "\n";
}</lang>
{{out}}
<pre>
Christmas 2021 Saturday
New Years 2022 Saturday
</pre>


=={{header|Phix}}==
=={{header|Phix}}==