Latest web development tutorials

JavaScript toUTCString () method

Date Object Reference JavaScript Date Object

Examples

According to Universal Time (UTC) of the Date object to a string:

var d=new Date();
var n=d.toUTCString();

n output:


try it"

Definition and Usage

toUTCString () method according to Universal Time (UTC) of the Date object to a string and returns the result.

Tip: Coordinated Universal Time, also known as the unified world time, Universal Time, Coordinated Universal Time, abbreviated UTC.It is from the English "Coordinated Universal Time" / French "Temps Universel Cordonne" from.

Note: UTC time and GMT (Greenwich Mean) time the same.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support toUTCString () method


grammar

Date.toUTCString()

Return Value

Type 描述
String date Object 的字符串表示,用世界时(UTC)表示。

technical details

JavaScript version: 1.3


Date Object Reference JavaScript Date Object