summaryrefslogtreecommitdiff
path: root/scripts/arizona/syllabus_dates
blob: 444e93cf6bb5f923abb8908646397ede5c50360d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/perl

use Date::Manip;

my $date = Date::Manip::Date->new;
$date->parse("2020-08-24");

my $limit = Date::Manip::Date->new;
$limit->parse("2020-12-09");

while ($date->cmp($limit) < 1) {
    if (grep $_ eq $date->printf("%w"), 1, 3, 5) {
        print $date->printf("%A %E %B\n:\n\n");
    }

    my $delta = $date->new_delta;
    $delta->parse("in 1 day");
    $date = $date->calc($delta);
}