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

RE: Backing up two days from localtime

Thread Previous | Thread Next
From:
Timothy Johnson
Date:
April 26, 2002 08:30
Subject:
RE: Backing up two days from localtime
Message ID:
C0FD5BECE2F0C84EAA97D7300A500D50025813E5@SMILEY
 
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
To: beginners@perl.org
Sent: 4/26/02 5:40 AM
Subject: Re: Backing up two days from localtime

on Fri, 26 Apr 2002 12:32:21 GMT, calumet@Mindspring.com (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

    	<http://search.cpan.org/search?dist=Date-Calc>

It will cover most calculations with dates.

With ActivePerl on Windows, it's easily installed with

    	ppm install Date::Calc

-- 
felix

-- 
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About