Help for this page

Select Code to Download


  1. or download this
      for ( date2offset($start) .. date2offset($end) ) {
          push @{$effective[$_]}, \$data;
      }
    
  2. or download this
      my $results = $effective[date2offset($date)];    # O(1)
      if ( defined($results) {
          # @$results is an array of all matching $data
      }
    
  3. or download this
      sub date2offset {
          my($yyyymmdd) = @_;
    ...
          my $day = $mmdd % 100 - 1;
          return $year * (12 * 31) + $month * 31 + $day;
      }