RE: Dates again.

2005-12-05 Thread Rafael Morales
ohnson" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED], "Rafael Morales" <[EMAIL PROTECTED]> Subject: RE: Dates again. Date: Mon, 5 Dec 2005 10:32:29 -0800 > > > localtime() returns an array with populated with the details about the > current time and date (unless y

Re: Re: Dates again.

2005-12-05 Thread Beau E. Cox
Hi vmalik - At 2005-12-05, 07:09:51 you wrote: >I am assuming that localtime() returns the time in unix file format (number of >seconds since 12:00 AM on January 01, 1970). Why don't you convert 72 days to >seconds and subtract that number from the output of localtime()? No. time() returns epo

RE: Dates again.

2005-12-05 Thread Timothy Johnson
ven easier: my $dateInThePast = time - 72 * 86400; -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, December 05, 2005 9:10 AM To: Rafael Morales Cc: beginners@perl.org Subject: Re: Dates again. I am assuming that localtime() returns the time in unix f

Re: Dates again.

2005-12-05 Thread vmalik
I am assuming that localtime() returns the time in unix file format (number of seconds since 12:00 AM on January 01, 1970). Why don't you convert 72 days to seconds and subtract that number from the output of localtime()? For example, 72 days = 72 x 3600 x 24 seconds = 6220800 seconds So, try:

Dates again.

2005-12-05 Thread Rafael Morales
Hi to all !!! Now I have a new trouble with dates. How can I know the date of 72 days ago ?. For example for get 2005-12-05, I do this use POSIX qw(strftime); my $today = strftime "%Y-%m%d", localtime(); I would like to get this date: 2005-09-21. Thanks list. --