ID: 20596 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Bogus Bug Type: Date/time related Operating System: WIN 2000 PHP Version: 4.2.1 New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. right, not a bug -> bogus Previous Comments: ------------------------------------------------------------------------ [2002-11-23 09:53:52] [EMAIL PROTECTED] The second argument of date() should be an integer timestamp, not a string. You can use e.g. mktime() or strtotime() to get such a timestamp: # php -r 'echo date("t", mktime(0,0,0,9,1,2002)),"\n";' 30 ------------------------------------------------------------------------ [2002-11-23 09:30:04] [EMAIL PROTECTED] <?php // As September has 30 days $x, $y & $z should all be // 30 ... instead the result is always 31 // Unfortunately cal_days_in_month is not supported on the // target server (php 4.1.2) even though though the // documentation says it is $x = date('t', '1 Sep 2002'); $y = date('t', 'Sep'); $z = date('t', '2002-09-01'); ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=20596&edit=1