It functions ok for adding 14 days to the current date, but it seems to deduct 1 month from the current date also. i.e if the date is 2002-02-02 it will change it to 2002-01-16 any ideas where i am going wrong? Thanks#Take Current System Date And Add Two Weeks On For Trial use constant WEEK => 60 * 60 * 24 * 7 ; my @later = localtime( time + ( WEEK * 2 ) ) ; my $expiry_date = sprintf "%04d-%02d-%02d", $later[5] + 1900, $later[4], $later[3] ;
In reply to Adding To Dates by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |