Day of the week: Difference between revisions

Content added Content deleted
(→‎{{header|PureBasic}}: Added PureBasic)
Line 725: Line 725:
print "25 Dec $i is Sunday\n";
print "25 Dec $i is Sunday\n";
}
}
}

exit 0;</lang>
or shorter:
<lang perl>#! /usr/bin/perl -w

use DateTime;
use strict;
for (2008 .. 2121) {
print "25 Dec $_ is Sunday\n"
if DateTime->new(year => $_, month => 12, day => 25)->day_of_week == 7;
}
}