Easy Tutorial
❮ Prop Style Flexdirection Jsref Obj Number ❯

JavaScript getUTCFullYear() Method

JavaScript Date Object

Example

Returns the four-digit year according to Coordinated Universal Time (UTC):

Result output:


Definition and Usage

The getUTCFullYear() method returns the four-digit year according to Coordinated Universal Time (UTC).

Calculating dates using UTC is based on the local time and date.

Tip: Coordinated Universal Time (UTC), also known as Universal Coordinated Time, World Standard Time, and International Coordinated Time, is abbreviated as UTC.

Note: UTC time is similar to GMT time.


Browser Support

The getUTCFullYear() method is supported by all major browsers.


Syntax

Return Value

Type Description
Number A four-digit number representing the year

Technical Details

| JavaScript Version: | 1.3 | | --- | --- |


More Examples

Example

Returns the UTC year of a specified date:

n output result:


JavaScript Date Object

❮ Prop Style Flexdirection Jsref Obj Number ❯