2 ms·
The funny part is that JavaScript copied this behaviour from Java for compatibility (in fact most of JavaScript's Date's behaviour is a direct copy of Java's).
by pluma 10y ago
The funny part is that JavaScript copied this behaviour from Java for compatibility (in fact most of JavaScript's Date's behaviour is a direct copy of Java's).
I didn't know that this is one case where Java copied from C, which means JS copied it from Java and Java copied it from C (which itself seems to have inherited it via POSIX), all in the name of API compatibility but confusing the majority of programmers in each language every time.
- bluetech 10y agoThere is this: https://github.com/maggiepint/proposal-temporal https://github.com/maggiepint/proposal-temporal A proposal to copy java.time to javascript. Hopefully this will happen eventually!