Help for this page
#!/usr/bin/env perl -l ... for (1 .. 7) { # Time::Piece->wday returns: Sunday = 1, ..., Saturday += 7 print +($_ - Time::Piece->strptime("$year$month" . '01', '%Y%m%d') +->wday) % 7 + 1; }
6 7 ... 3 4 5
$ cal 10 2013 October 2013 ... 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31