4 ms·
in JavaScript, new Date().getYear() returns 117 :)
by collinmanderson 9y ago
in JavaScript, new Date().getYear() returns 117 :)
- niix 9y agoMakes sense.
- tracker1 9y agogetYear() is based from 1900, if you use getFullYear() you'll get 2017. Though, given all the additions to ES201*, it would be nice if all the timezone data were in the browsers, so one could get moment-timezone without the, relatively large data files.
- rimliu 9y agoAnd in early 2000 web was full of "Copyright 19100".
- dspillett 9y ago.getYear() and .setYear() are deprecated in all recent standards [IIRC they were before 2000, I certainly remember them being recommended against as far back as that].