Comment by dmurray
4 years ago
> On the other hand, I've never had trouble remembering just how many seconds (or minutes) there are in a day, since.
Not everyone is so fortunate: https://news.ycombinator.com/item?id=7717414
4 years ago
> On the other hand, I've never had trouble remembering just how many seconds (or minutes) there are in a day, since.
Not everyone is so fortunate: https://news.ycombinator.com/item?id=7717414
This is why it’s better to express time in seconds using multiplication. Easier to write, easier to review, and easier to change.
It's better yet to use a specific time or callendrical function if what you're accounting for is a specific clock or calendar interval.
Not all days have precisely 86,400 seconds.
For longer intervals, not all months have 28, 29, 30, 31, 30.43685, whatever, days. Not all years have 365 or 366 days, etc.
Pull out your copy of "Myths Programmers Believe About Time" and read it, hard. It will bite.
Huh, that's an old thread. Was quite confused when the "upcoming PHP 5.6 release" was mentioned!
Ouch!