Standard built-ins
Date.prototype.setUTCDate()
Set day of month in UTC, normalizing overflow; mutates receiver.
Formal Syntax & Structure
javascript syntaxjavascript
date.setUTCDate(date)Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| date | Number | UTC day, may overflow. |
Return Value
Number
New timestamp or NaN.
Working Example
Example Snippetjavascript
const d=new Date("2024-02-28T00:00:00Z");d.setUTCDate(30);console.log(d.toISOString());