MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/3v4l98/php_7_released/cxl0tt5/?context=3
r/programming • u/fnkrx • Dec 02 '15
729 comments sorted by
View all comments
Show parent comments
58
months are numbered 0-11 and days are numbered 1-31
Javascript does this too, it's extremely frustrating.
25 u/jachymb Dec 02 '15 It's useful actually. If use other language than English, you want an array of month names that you index with this number. Month days don't have names, so they you don't need it there. 4 u/tjsr Dec 02 '15 So create an array with 13 elements where 0 is "unknown". 6 u/mongopeter Dec 02 '15 That's a hack and hacks are bad. → More replies (2)
25
It's useful actually. If use other language than English, you want an array of month names that you index with this number. Month days don't have names, so they you don't need it there.
4 u/tjsr Dec 02 '15 So create an array with 13 elements where 0 is "unknown". 6 u/mongopeter Dec 02 '15 That's a hack and hacks are bad. → More replies (2)
4
So create an array with 13 elements where 0 is "unknown".
6 u/mongopeter Dec 02 '15 That's a hack and hacks are bad. → More replies (2)
6
That's a hack and hacks are bad.
→ More replies (2)
58
u/Wootman42 Dec 02 '15
Javascript does this too, it's extremely frustrating.