|Perl: the Markov chain saw|
Working with dateby alk1000 (Initiate)
|on Jun 04, 2003 at 01:56 UTC||Need Help??|
alk1000 has asked for the
wisdom of the Perl Monks concerning the following question:
I've just 3 short questions about date:
1- if i've $newdate = `date`;
i'll get $newdate equal to "Wed Jun 4 11:30:16 EST 2003". What's the best way to change the $newdate to "04-06-2003 11:30:16". the way i figured out is pretty long.
2- Using localtime in perl, how can i print the date as dd-mm-yyyy (i.e. 04-06-2003). do i've to use printf or is there any other way?
2- How can i add 10 days to $newdate to get a new variable $deldate, with automatic month/year increment if the case calls.
Tanx in advance, AnA (newbie)