Back

dateObj.getUTCDate()

dateObj.getUTCDate()

The getUTCDate() method returns the day (date) of the month in the specified date according to universal time.

Syntax

dateObj.getUTCDate()

Parameters

None.

Return value

The value returned by getUTCDate() is an integer between 1 and 31.

Examples

Using getUTCDate()

The following example assigns the day portion of the current date to the variable day.

var today = new Date();
var day = today.getUTCDate();

  Created by Mozilla Contributors, license: CC-BY-SA 2.5