There's one "quirk" in date-handling in a series of programming languages that have become a pet peeve of mine. It seems to have become a standard, and I don't think it's all that logical.
What I'm talking about is calling "next month" as a relative string. You know, as when calling strtotime('next month') to calculate which month is coming up. This sounds like a logical thing to do, right?
It isn't. For instance, if the current date is January 30th, this function will return March. The function adds about 30/31 days, so you'll end up with March 2nd or something. This is actually "behavior as intended". I think it's very counter-intuitive, but of course it's not my call.
A more informative post about this can be found here.
No comments:
Post a Comment