ES6 - toUTCString() 方法

此方法使用通用时间约定将日期转换为字符串。

语法

Date.toUTCString ()

返回值

使用通用时间约定将转换后的日期返回为字符串。

示例

var dateobject = new Date(1993, 6, 28, 14, 39, 7); 
console.log( dateobject.toUTCString());           

输出

Wed, 28 Jul 1993 09:09:07 GMT