On Sat, 02 Feb 2002 01:00:13 +0000, Fliptop wrote:

> Argenis Perez wrote:
> 
>> this statement
>> ($sec,$min,$hour,$mon,$year,$wday,$yday,$isdst) = localtime(); i obtain
>> the date of today, but i need the $day,$mon,$year of yesterday
> 
> 
> look into the date::calc module.  it's very handy for many date
> calculations.
> 
> http://search.cpan.org/search?dist=Date-Calc

Date::Calc can sometimes be usef, but it's overkill in a case like this.

my ($day, $mon, $year) = (localtime(time - 86_400))[3 .. 5];

NB: 86_400 is the number of seconds in a day.

hth,

Dave...

-- 

  Drugs are just bad m'kay

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to