note 58879 deleted from function.cal-days-in-month by jacques

From: Date: Fri, 18 Nov 2005 20:28:05 +0000
Subject: note 58879 deleted from function.cal-days-in-month by jacques
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-98784@lists.php.net to get a copy of this message
Note Submitter: Jordan Moore ---- > The date("t") doesn't work consistently. > > $lastdate = date("t", strtotime("february 1900")); > > sets $lastdate to 31 in 4.1. The answer should be 28. > cal_days_in_month correctly returns 28. You're facing two individual problems. 1) The furthest date back that strtotime() supports in PHP4 is 1970 or 1901 (depending on your system). In PHP4, strtotime() returns -1 instead of false when it fails. That's what's doing for you. 2) The date() function also has the same timeframe limitations.

« previous php.notes (#98784) next »