Share via


toUTCString, méthode

Retourne une date convertie en chaîne selon le temps universel (UTC, Universal Time Coordinated).

function toUTCString() : String

Notes

La méthode toUTCString retourne un objet String contenant la date exprimée selon le temps universel (UTC), dans un format facile à lire.

Exemple

L'exemple suivant illustre l'utilisation de la méthode toUTCString.

var dtFirst = new Date();
dtFirst.setUTCFullYear(2007);

var dtSecond = new Date();
// 10 is the value for November. 
dtSecond.setUTCFullYear(2008, 10, 3); 

print (dtFirst.toUTCString());
print (dtSecond.toUTCString());

Configuration requise

Version 3

S'applique à :

Date, objet

Voir aussi

Référence

toGMTString, méthode