# Date.getUTCDate()

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

```javascript
var date1 = new Date('August 19, 1975 23:15:30 GMT+11:00');
var date2 = new Date('August 19, 1975 23:15:30 GMT-11:00');

console.log(date1.getUTCDate());
// expected output: 19

console.log(date2.getUTCDate());
// expected output: 20

```

## Syntax <a href="#syntax" id="syntax"></a>

```javascript
dateObj.getUTCDate()
```

**Return value**

An integer number, between 1 and 31, representing the day of the month in the given date according to universal time.

## Examples <a href="#examples" id="examples"></a>

#### Using `getUTCDate()` <a href="#using_getutcdate" id="using_getutcdate"></a>

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

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

## References <a href="#references" id="references"></a>

{% embed url="<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCDate>" %}

## Contributors to this page <a href="#contributors-to-this-page" id="contributors-to-this-page"></a>

Uros Durdevic
