Help for this page

Select Code to Download


  1. or download this
    use warnings;
    use strict;
    ...
    is_deeply prevmonth(2004,1), [2003,12];
    
    done_testing;
    
  2. or download this
    use warnings;
    use strict;
    ...
        my $prev = $t->add_months(-1);
        print $prev->strftime('%m/%Y'), "\n";
    }