|
|
|
|
|
by jazzyjackson
1633 days ago
|
|
date.toLocaleDateString ("fr-CA") would have got you there, but yea agreed 0 indexed months are whack. I'm sure you've read the docs since then but just for the viewers at home: s/getYear/getFullYear s/getDay/getDate getYear is oldfashioned, years since 1900. getDay is day-of-the-week, 0 for Sunday, 1 for Monday, etc |
|
Why, if everything else in JS is 0 indexed? Isn't consistency a good thing in a language? If they'd gone the other way, wouldn't there be people here complaining that 1 indexing is whack?