NYCPHP Meetup

NYPHP.org

[nycphp-talk] mktime()

Craig Thomas craig at juxtadigital.com
Tue Jan 10 11:09:55 EST 2006


Craig Thomas wrote:
> Hi all,
> 
> Am I nuts or does this look odd:
> 
> <?php
> 
> for($i=1971;$i<=2099;$i++){
> 
> 	print $i. ": ";
> 
> 	if(mktime(0,0,0,0,0,$i) > mktime()){
> 		print mktime(0,0,0,0,0,$i). " >" .mktime() ;
> 	}
> 	else{
> 		print mktime(0,0,0,0,0,$i). " <" .mktime() ;
> 	}
> 	print "<br />";
> 	
> }
> 
> ?>
> 


Doh!  I need to read closer:

http://us2.php.net/manual/en/function.mktime.php

"The number of the year, may be a two or four digit value, with values 
between 0-69 mapping to 2000-2069 and 70-100 to 1970-2000. On systems 
where time_t is a 32bit signed integer, as most common today, the valid 
range for year is somewhere between 1901 and 2038, although this 
limitation is overcome as of PHP 5.1.0."

Sorry,

-- 
Craig




More information about the talk mailing list