Easy Tutorial
❮ Dom Obj Week Prop Style Animation ❯

JavaScript toUTCString() Method

JavaScript Date Object

Example

Convert a Date object to a string using Coordinated Universal Time (UTC):

n Output result:


Definition and Usage

The toUTCString() method converts a Date object to a string, using Coordinated Universal Time (UTC), and returns the result.

Note: Coordinated Universal Time, also known as Universal Time Coordinated, World Standard Time, and International Coordinated Time, abbreviated as UTC, comes from the English "Coordinated Universal Time" / French "Temps Universel Cordonné".

Attention: UTC time is the same as GMT (Greenwich Mean Time).


Browser Support

All major browsers support the toUTCString() method.


Syntax

Return Value

Type Description
String A string representation of the date object, expressed in Coordinated Universal Time (UTC).

Technical Details

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


JavaScript Date Object

❮ Dom Obj Week Prop Style Animation ❯