Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: High-speed Date Formatting

by hdb (Monsignor)
on Jul 12, 2013 at 08:58 UTC ( [id://1043913]=note: print w/replies, xml ) Need Help??

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>
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1043913]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-04-19 04:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found