I was working with JavaScript\'s Date object, and somewhere for the first time I needed to extract the year part of the date. What I saw was a weird behavior. It re
Date
Its a Y2K thing, basically getYear method returns the year minus 1900.
getYear
so, I encourage to move over to getFullYear & use that instead.
getFullYear