Help for this page

Select Code to Download


  1. or download this
    use Date::Simple qw/today/;
    use 5.010;
    ...
    my $month = $d->month;
    $d-- while $month == $d->month;
    say $d;
    
  2. or download this
    use Date::Simple qw/today ymd/;
    use 5.010;
    ...
    my $d = today;
    $d = ymd($d->year, $d->month, 1) - 1;
    say $d;