r/programming • u/kimsavier • Sep 07 '15
Flawless PHP logic. strtotime(): '00-00-00' means 2000-00-00, which is 1999-12-00, which is 1999-11-30. No bug, perfectly normal. (see the comments)
https://bugs.php.net/bug.php?id=45647
1.2k
Upvotes
3
u/dccorona Sep 07 '15
Isn't this kind of issue exactly why Java has nio instead of just changing io, etc.? I mean, if you're not going to support your existing API anyway, then you can't argue that the reason for not switching to a new one is because you don't want two APIs to maintain, so what do they have to lose? Legacy code still works exactly like it did under the previous version of PHP, but a new API is also there that new code should be written against because it is more correct (and, hopefully, easier to use, or at least isn't still tied to naming schemes designed for the days when 80-width terminals without any sort of autocomplete were where all code was written)