Current year wrong
| From: | ShortStay | Date: | Sun, 18 Jan 2004 19:47:13 +0000 |
| Subject: | Current year wrong | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-32480@lists.php.net to get a copy of this message | ||
Code as follows:
$curryear=date("Y");
$currmth=date("m");
$currentyear=date("Y", mktime(0,0,0,$currmth,0,$curryear));
print ("current year is $currentyear"); //wrong
gives me 2003, not 2004. Does anyone know why?
Thanks,
John