setUTCMonth (JavaScript)

Sets the month in UTC. Optionally sets the day.

Defined in

Date (Standard - JavaScript)

Syntax

setUTCMonth(month:int) : long

setUTCMonth(month:int, day:int) : long

Parameters Description
month The month in UTC where 0 is January.
date The day of the month in UTC where 1 is the first day of the month.
Return value Description
long The new time in numeric format.

Examples

This computed label sets the date to January 1 of the current year.
var date = new Date();
date.setUTCMonth(0, 1);
date.toUTCString()