develooper Front page | perl.beginners | Postings from April 2002

RE: Backing up two days from localtime

Thread Previous | Thread Next
Timothy Johnson
April 26, 2002 08:30
RE: Backing up two days from localtime
Message ID:
You can convert the date/time to seconds format using the Time::Local
module.  It attempts to do a "reverse localtime()".

-----Original Message-----
From: Felix Geerinckx
Sent: 4/26/02 5:40 AM
Subject: Re: Backing up two days from localtime

on Fri, 26 Apr 2002 12:32:21 GMT, (Tara
Calishain) wrote: 

> Actually, are there any books/docs that talk specifically about
> dealing with time?
> I'm anticipating coming across this same problem with user input
> dates, and I don't expect the seconds trick will work for that
> one. 
> For example, say a user specified $day-$month-$year and ten days,
> and I wanted to generate a date string for every day going back
> ten days. 

You might want to look into the Date::Calc module at


It will cover most calculations with dates.

With ActivePerl on Windows, it's easily installed with

    	ppm install Date::Calc


To unsubscribe, e-mail:
For additional commands, e-mail:

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About