Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: convert a given YYYY-MM-DD to epoch time

by jeffa (Bishop)
on Dec 04, 2015 at 22:28 UTC ( #1149418=note: print w/replies, xml ) Need Help??


in reply to convert a given YYYY-MM-DD to epoch time

Your main requirement seems to simply be to "determine what day it was," and you can do that with several CPAN modules. I really like Time::Piece

use strict; use warnings; use Time::Piece; my $date = shift || '1999-12-31'; my $time = Time::Piece->strptime( $date, '%Y-%m-%d' ); print $time, $/; print $time->fullday, $/;

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2022-01-22 11:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (62 votes). Check out past polls.

    Notices?