Doc #78591 [NEW]: Short year to full year conversion range not specified

From: Date: Mon, 23 Sep 2019 18:29:10 +0000
Subject: Doc #78591 [NEW]: Short year to full year conversion range not specified
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-16961@lists.php.net to get a copy of this message
From: nerketur at hotmail dot com Operating system: Windows PHP version: Irrelevant Package: PHP Language Specification Bug Type: Documentation Problem Bug description:Short year to full year conversion range not specified Description: ------------ As seen on the example code below, conversion to full year from short year is done in the range 1970 -> 2069. However, this is not specified in the documentation. The reason this isn't "obvious" is because some languages allow you to specify the range of conversion, and others seem to use a different range. --- From manual page: https://php.net/function.date --- Test script: --------------- <?php for ($x = 10; $x <= 99; $x++) { $dateString = "1/1/$x"; echo "$dateString: " . DateTime::createFromFormat("m/d/y", $dateString)->format("Y") . "<br>"; } ?> -- Edit bug report at https://bugs.php.net/bug.php?id=78591&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=78591&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=78591&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=78591&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=78591&r=needscript Try newer version: https://bugs.php.net/fix.php?id=78591&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=78591&r=support Expected behavior: https://bugs.php.net/fix.php?id=78591&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=78591&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=78591&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=78591&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=78591&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=78591&r=dst IIS Stability: https://bugs.php.net/fix.php?id=78591&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=78591&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=78591&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=78591&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=78591&r=mysqlcfg

« previous php.doc.bugs (#16961) next »