JavaScript getUTCFullYear() Method
Example
Return the 4-digit year based on universal time (UTC):
var d = new Date();
var n = d.getUTCFullYear();
Result output:
Try it »
Definition and Usage
The getUTCFullYear() method returns the 4-digit year based on universal time (UTC).
Calculating dates with UTC is based on local time and date.
**Tip:** Coordinated Universal Time, also known as Universal Time, World Standard Time, or International Coordinated Time, abbreviated as UTC (Universal Coordinated Time).
**Note:** UTC time is similar to GMT time.
Browser support





All major browsers support the getUTCFullYear() method.
Syntax
Date
.getUTCFullYear()
Return Value
| Type | Description |
|---|---|
| Number | A 4-digit number representing the year |
Technical Details
| JavaScript version: | 1.3 |
|---|
More examples
Example
Return the UTC year of a specified time:
var d=new Date("July 21, 1983 01:15:00");
var n=d.getUTCFullYear();
nOutput result:
1983
Try it »
JavaScript Date object