Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: High-speed Date Formatting

by hdb (Monsignor)
on Jul 12, 2013 at 08:58 UTC ( #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
Node Status?
node history
Node Type: note [id://1043913]
help
Chatterbox?
[Discipulus]: choroba started in primary school to get some advantage in the future..
[choroba]: nono, I programmed in Basic at the primary school, on my Commodore 116/16
[Discipulus]: ;=)
[choroba]: then learned some assebly on the same machine, then moved to my father's PC (XT with a Hercules card), used Turbo Pascal a lot
[choroba]: I started with *nix at the University, we had some Sparcs and Linux machines
[choroba]: that was around 1994 or 95
hippo actually introduced Linux to his university.
Discipulus mmh will be a fun meditation: How I started with computers and programming..
[Discipulus]: bravo hippo! well done

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2018-06-22 09:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (123 votes). Check out past polls.

    Notices?