Visit Mozilla.org

Core JavaScript 1.5 Reference:Global Objects:Date:toUTCString

From MDC


Contents

[edit] Summary

Converts a date to a string, using the universal time convention.

Method of Date
Implemented in: JavaScript 1.3
ECMA Version: ECMA-262

[edit] Syntax

toUTCString()

[edit] Parameters

None.

[edit] Description

The value returned by toUTCString is a readable string formatted according to UTC convention. The format of the return value may vary according to the platform.

[edit] Examples

[edit] Example: Using toUTCString

var today = new Date();
var UTCstring = today.toUTCString();
// Mon, 03 Jul 2006 21:44:38 GMT

[edit] See Also

toLocaleString