Date.setUTCMonth

setUTCMonth – Set the month, according to universal time (0–11).

Description

Date.setUTCMonth(integer month)

Parameters

Name Description Type Default Optional
month integer No

Return values

Integer. The new timestamp.

Examples

Example #1 – setUTCMonth example
var date = new Date(Date.UTC(2015, 9, 21, 16, 29, 00)); console.log(date.getTime()); // 1445444940000 console.log(date.setUTCMonth(10)); // 1448123340000

External references