RosettaCodeData/Task/Long-year/Perl/long-year.pl
2023-07-01 13:44:08 -04:00

10 lines
237 B
Perl

use strict;
use warnings;
use DateTime;
for my $century (19 .. 21) {
for my $year ($century*100 .. ++$century*100 - 1) {
print "$year " if DateTime->new(year => $year, month => 12, day => 28)->week_number > 52
}
print "\n";
}