Help for this page

Select Code to Download


  1. or download this
    use DateTime::Format::Strptime;
    my $strp = DateTime::Format::Strptime->new(
    ...
    my $dt = $strp->parse_datetime('2017-11-23');
    my $is_thanksgiving = $dt->month==11 && $dt->dow==4
        && $dt->weekday_of_month==4;
    
  2. or download this
    sub thanksgiving {
        my $year = shift;
    ...
        $dt->add(weeks=>3);
        return $dt;
    }