History of Zero-Based Months?
jefftk.com
History of Zero-Based Months?
1–10 of 30 posts
Re: History of Zero-Based Months?
#2Re: History of Zero-Based Months?
#3At least in Perl, the rationale for this (apart from copying C) is that it's very easy to reference a list (array) of month names if the month indices are zero-based.
Re: History of Zero-Based Months?
#4This Twitter thread from November 2020[1] and its HackerNews discussion[2] seem relevant.
1: https://twitter.com/hillelogram/status/1329228419628998665
Re: History of Zero-Based Months?
#5"Why is day of the month 1-indexed but the month is 0-indexed in C?" This Twitter thread from November 2020[1] and its HackerNews discussion[2] seem relevant. 1: https://twitter.com/hillelogram/status/1329228419628998665 2: https://news.ycombinator.com/item?id=25195287
Re: History of Zero-Based Months?
#6"Why is day of the month 1-indexed but the month is 0-indexed in C?" This Twitter thread from November 2020[1] and its HackerNews discussion[2] seem relevant. 1: https://twitter.com/hillelogram/status/1329228419628998665 2: https://news.ycombinator.com/item?id=25195287
Why don't we enumerate days throughout the year?
Which is probably because it's too fine a granularity, especially historically: even an ordinal month-day had limited use to preindustrial contexts were time-boundaries were necessary quite fuzzy owing to the vagaries of communications or transport.
Technically you don't need years either, but chunky boundaries are useful as both reference points and communication shortcuts.
Re: History of Zero-Based Months?
#7Re: History of Zero-Based Months?
#8At least in Perl, the rationale for this (apart from copying C) is that it's very easy to reference a list (array) of month names if the month indices are zero-based.
How difficult is it to either subtract 1 before indexing your array, or have a 13 element array with a dummy value in element 0? Deprecate time.h and adopt ISO 8601 already.
Re: History of Zero-Based Months?
#9I think it's important to be able to work with mod(%) 12 for some operations on year month relationship. All years have 12 months. For day of the month you need additional logic to handle diferent lengths... and other issues.
Re: History of Zero-Based Months?
#10"Why is day of the month 1-indexed but the month is 0-indexed in C?" This Twitter thread from November 2020[1] and its HackerNews discussion[2] seem relevant. 1: https://twitter.com/hillelogram/status/1329228419628998665 2: https://news.ycombinator.com/item?id=25195287
Why don't we enumerate days throughout the year?
[1]: https://en.wikipedia.org/wiki/French_Republican_calendar#Mon...