Thread
:
Date Routine
View Single Post
Jan 15th, 2007, 11:14 AM
#
3
Arevos
Programming Guru
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power:
5
Subtracting 86400 from the time will work most of the time, but not all of the time. If you need accuracy, use a module like
DateTime
:
perl Syntax
(
Toggle Plain Text
)
use
DateTime;
my
$yesterday
= DateTime->
now
->
subtract
(
days =>
1
)
;
use DateTime; my $yesterday = DateTime->now->subtract( days => 1 );
Arevos
View Public Profile
Visit Arevos's homepage!
Find More Posts by Arevos