Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: A date calculation

by poolpi (Hermit)
on Dec 19, 2007 at 09:37 UTC ( [id://657836]=note: print w/replies, xml ) Need Help??


in reply to A date calculation

use DateTime; my $dt = DateTime->now(time_zone => 'UTC'); $dt->add( days => 13); print substr( $dt->year, -2 ), $dt->month < 10 ? '0' : '', $dt->month;

Output:
0801

Update :
perl -MDateTime -e 'print unpack( "x2A2xA2", DateTime->now(time_zone => 'UTC') ->add(days => 13) );'

HTH,

PooLpi

Log In?
Username:
Password:

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

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

    No recent polls found