Hacker News new | ask | show | jobs
by globular-toast 1818 days ago
Probably because the ancients didn't have a strong grasp on the number 0.

Midnight is zero. What's confusing about the number of days starting from 0 too?

Why do we use months? No sane internal representation stores the number of months. They are completely and utterly useless and exist only in printed representations of dates.

2 comments

Props to the Mayans, whose dates are (almost) a base-20 number counting from the Mayan date of creation. It's not fully base 20, because the 2nd digit only counts to 18 because 360 is close enough to a year. So 13.0.5.17.19 is followed by 13.0.6.0.0 instead of 13.0.5.18.0. Bonus points: no leap years to worry about!

The downside is that their full calendar is somewhat more complicated, so they would say that today is (checks) 13.0.8.11.11 8 Chuwin 9 Sek, and tomorrow is 13.0.8.11.12 9 Eb' 10 Sek (that Tzolkin calendar component doesn't work like our months do!).

I was meaning in the context of JavaScript, where the first day is 1 and the first month is 0.

A case can be made for either 0 (for consistency with time representation) or 1 (to go with the defacto standard of how most if us bipedal meatsacks process dates) but there must have been alcohol or something stronger involved when the current date object came into being.

Erm... nobody was arguing for it being the current way. That's retarded. This whole thread is about making them both 0-based rather than both 1-based.