A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/javascript/Date/getUTCFullYear below:

getUTCFullYear ยท WebPlatform Docs

getUTCFullYear Summary

Gets the year using Universal Coordinated Time (UTC).

Syntax
dateObj.getUTCFullYear()
Return Value

Returns the year as a four-digit number. Years specified as two digits in the Date constructor or in setFullYear are assumed to be in the twentieth century, so given "5/14/12", getUTCFullYear returns "1912".

Examples

The following example shows how to use the getUTCFullYear method.

var date = new Date("1/9/36");
 document.write(date.getUTCFullYear());

 
Remarks

The required dateObj reference is a Date object. To get the year using local time, use the getFullYear method.

See also Other articles Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4