3 ms·
I assume that first versions of JavaScript were written in C, and that's where this comes from: http://www.cplusplus.com/reference/ctime/tm/ http://www.cpluspl
by babuskov 12y ago
I assume that first versions of JavaScript were written in C, and that's where this comes from:
http://www.cplusplus.com/reference/ctime/tm/ http://www.cplusplus.com/reference/ctime/tm/
tm_mday = day of month (1-31)
tm_mon = months since January (0-11)
Which AFIAK goes all the way back to POSIX standard.
The real problem is that JavaScript as higher level language decided to inherit this awkward convention instead of making their own, consistent rules.
Given the time it took to create the first JS implementation, it is no wonder that some shortcuts were taken.