Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

Date.prototype.getFullYear()

2 tags 1 category

The getFullYear() method of Date instances returns the year for this date according to local time.

Use this method instead of the getYear() method.

Unlike getYear(), the value returned by getFullYear() is an absolute number. For dates between the years 1000 and 9999, getFullYear() returns a four-digit number, for example, 1995. Use this function to make sure a year is compliant with years after 2000.

Return value: An integer representing the year for the given date according to local time. Returns NaN if the date is invalid.

Syntax example: getFullYear()

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…