getUTCDate Method (Windows Scripting - JScript)

 

Returns the day-of-the-month value in a Date object using Universal Coordinated Time (UTC).

Syntax

dateObj.getUTCDate() 

Remarks

The required dateObj reference is a Date object.

To get the day of the month using local time, use the getDate method.

The return value is an integer between 1 and 31 that represents the day-of-the-month value in the Date object.

The following example illustrates the use of the getUTCDate method.

function UTCDateDemo(){
   var d, s = "Today's UTC date is: ";
   d = new Date();
   s += (d.getUTCMonth() + 1) + "/";
   s += d.getUTCDate() + "/";
   s += d.getUTCFullYear();
   return(s);
}

Requirements

Version 3

Applies To: Date Object (Windows Scripting - JScript)

See Also

getDate Method (Windows Scripting - JScript)
setDate Method (Windows Scripting - JScript)
setUTCDate Method (Windows Scripting - JScript)