Help for this page

Select Code to Download


  1. or download this
    my $leaps =  int( ($y - 1970) / 4 + 0.5 );
        (((($y-1970)*365 +$leaps+MONTHS->{$m}+($d-1))*24 +$H)*60 +$M)*60 +
    +$S;
    
  2. or download this
    (((int(($y-1970)*365.25-.5)+MONTHS->{$m}+$d)*24 +$H)*60 +$M)*60 +$S;
    
  3. or download this
    sub str2epoch3 {
        (((int((substr($_[0],12,4)-1970)*365.25-.5)+
         MONTHS->{substr($_[0],8,3)}+substr($_[0],5,2))*24 +substr($_[0],1
    +7,2))*60 +
         substr($_[0],20,2))*60 +substr($_[0],23,2);
    }
    
  4. or download this
    use strict;
    use warnings;
    ...
                   substr    => sub { str2epoch3($str) }, }
        );
    </readmore>