Who believes these things? February is always 28 days long? Any 24-hour period will always begin and end in the same day (or week, or month)? A week always begins and ends in the same month?
Falsehoods Programmers believe about Time
11–20 of 222 posts
Re: Falsehoods Programmers believe about Time
#12Also, time is unidirectional.
The computer clock might not be.
Re: Falsehoods Programmers believe about Time
#13About #7: doesn't a month always end in the same year it started?
But at least in the western system it shouldn't be possible to it to span years.
Re: Falsehoods Programmers believe about Time
#14Who believes these things? February is always 28 days long? Any 24-hour period will always begin and end in the same day (or week, or month)? A week always begins and ends in the same month?
I can easily imagine somebody introducing a bug that relies on a 24 hour period ending in the same month as it began.
Re: Falsehoods Programmers believe about Time
#15Re: Falsehoods Programmers believe about Time
#16 15.9.1.2 Day Number and Time within Day # Ⓣ
A given time value t belongs to day number
Day(t) = floor(t / msPerDay)
where the number of milliseconds per day is
msPerDay = 86400000
http://es5.github.com/#x15.9.1.2Re: Falsehoods Programmers believe about Time
#17Re: Falsehoods Programmers believe about Time
#18But really, with regards to time use whatever library came with you programming language.
Re: Falsehoods Programmers believe about Time
#19Can someone explain #1? I suspect it has to do with crossing time zones?
Day light savings transition days. When you skip ahead, that day has 23 hours in it. When you fall back, it has 25.