Help for this page

Select Code to Download


  1. or download this
    # "my" variable $date masks earlier declaration in same scope.
    
  2. or download this
    sub calcDate {
        my $offset = shift;
    ...
        return sprintf "%04s-%02s-%02s", $year + 1900,
            $mon + 1, $mday;
    }