|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2018-08-23 17:10 UTC] requinix@php.net
[2018-11-28 14:19 UTC] bjoern dot fischer at dezem dot de
[2020-01-20 17:35 UTC] girgias@php.net
-Assigned To:
+Assigned To: derick
[2020-01-20 17:35 UTC] girgias@php.net
[2021-04-06 18:40 UTC] derick@php.net
-Type: Bug
+Type: Feature/Change Request
[2022-06-05 14:25 UTC] derick@php.net
-Status: Assigned
+Status: Wont fix
[2022-06-05 14:25 UTC] derick@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 03:00:01 2025 UTC |
Description: ------------ DateTime object instantiation with negative input string via 'createFromFormat' and same argument just as construction argument display weird behaviour. Test script: --------------- var_dump(DateTime::createFromFormat('Y-m-d', '0045-01-01')); // works var_dump(DateTime::createFromFormat('Y-m-d', '-0045-01-01')); // false var_dump(DateTime::createFromFormat('-Y-m-d', '-0045-01-01')); // works, but year is positive instead of negative var_dump(new DateTime('0045-01-01')); // works var_dump(new DateTime('-0045-01-01')); // works var_dump(new DateTime('0045/01/01')); // works var_dump(new DateTime('-0045/01/01')); // exception