Javascript date.getYear() returns 111 in 2011?

Https://developer.mozilla. Org/en/JavaScript/Reference/Global_Objects/Date/getYear getYear is no longer used and has been replaced by the getFullYear method The getYear method returns the year minus 1900; thus: For years greater than or equal to 2000, the value returned by getYear is 100 or greater. For example, if the year is 2026 getYear returns 126 For years between and including 1900 and 1999, the value returned by getYear is between 0 and 99.

For example, if the year is 1976 getYear returns 76 For years less than 1900, the value returned by getYear is less than 0. For example, if the year is 1800 getYear returns -100 To take into account years before and after 2000, you should use getFullYear instead of getYear so that the year is specified in full.

Https://developer.mozilla. Org/en/JavaScript/Reference/Global_Objects/Date/getYear getYear is no longer used and has been replaced by the getFullYear method. The getYear method returns the year minus 1900; thus: For years greater than or equal to 2000, the value returned by getYear is 100 or greater.

For example, if the year is 2026, getYear returns 126. For years between and including 1900 and 1999, the value returned by getYear is between 0 and 99. For example, if the year is 1976, getYear returns 76.

For years less than 1900, the value returned by getYear is less than 0. For example, if the year is 1800, getYear returns -100. To take into account years before and after 2000, you should use getFullYear instead of getYear so that the year is specified in full.

Thanks .. I had my code based off this SO question: stackoverflow. Com/questions/605113/… that uses getYear() – JK. Jan 21 at 3:13 Great, works, fixed one of my decade old scripts!

:) – ymasood May 17 at 13:46 Y2K strikes again! – MrDustpan Jul 25 at 15:48.

In order to comply with boneheaded precedent, getYear() returns the number of years since 1900. Instead, you should call getFullYear(), which returns the actual year.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions