#51012 [Opn->Bgs]: February 30th is a valid date for strtotime

From: Date: Thu, 11 Feb 2010 12:13:25 +0000
Subject: #51012 [Opn->Bgs]: February 30th is a valid date for strtotime
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-147433@lists.php.net to get a copy of this message
ID: 51012 Updated by: johannes@php.net Reported By: stlwrt at gmail dot com -Status: Open +Status: Bogus Bug Type: Date/time related Operating System: Fedora 12, OSX 10.6.2 PHP Version: 5.3.1 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php use check_date() for validating dates. Previous Comments: ------------------------------------------------------------------------ [2010-02-11 11:21:37] stlwrt at gmail dot com Description: ------------ strtotime accepts "2010-02-30" as a valid date and converts it to timestamp Reproduce code: --------------- <?php var_dump(strtotime('2010-02-30')); ?> Expected result: ---------------- bool(false) Actual result: -------------- int(1267480800) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=51012&edit=1

« previous php.bugs (#147433) next »