summaryrefslogtreecommitdiffstats
path: root/019.pl
blob: b0d1cb6a9c7ffa6fc26c288cbfe76ac5ab121240 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/perl
use strict;
use warnings;
use DateTime;

my $day = DateTime->new(year => 1901, month => 1, day => 1);
my $count = 0;
while ($day->year < 2001) {
    $count++ if $day->day_of_week == 7 && $day->day_of_month == 1;
    $day->add(days => 1);
}
print "$count\n";