Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Date::Manip and date

by neilwatson (Priest)
on Jul 09, 2015 at 12:46 UTC ( #1133953=note: print w/replies, xml ) Need Help??


in reply to Date::Manip and date

Also Time::Piece

use Time::Piece; my $date1 = Time::Piece->localtime(); my $date2 = Time::Piece->strptime( $args{date}, "%Y-%m-%dT%H:%M:%S" ); if ( $date2 > $date2 ) { # do something }; my $diff = $date1 - $date2; # in seconds my $days = $diff->days

Neil Watson
watson-wilson.ca

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2019-08-22 12:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?