RE: Current year wrong

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry, it's bcs its got 0 as the day...stupid me.

-----Original Message-----
From: ShortStay [mailto:john@xxxxxxxxxxxxxxxxxxxx]
Sent: Sunday, January 18, 2004 7:47 PM
To: php-db@xxxxxxxxxxxxx
Subject: Current year wrong


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



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux