Skip to content

Instantly share code, notes, and snippets.

@yuuki
Created August 10, 2012 07:58
Show Gist options
  • Save yuuki/3312505 to your computer and use it in GitHub Desktop.
Save yuuki/3312505 to your computer and use it in GitHub Desktop.
use 5.010;
# チート
use Date::Simple ('ymd');
use Date::Range;
my $range = Date::Range->new(ymd(1901, 1, 1), ymd(2000, 12, 31));
my @dates = grep { $_->day == 1 and $_->day_of_week == 0 } $range->dates;
say $#dates + 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment