Siebel eScript Language Reference > Siebel eScript Commands > Universal Time Methods >

getUTCMonth() Method


This method returns the UTC month of a Date object.

Syntax

dateVar.getUTCMonth()

Parameter
Description

Not applicable

 

Returns

The UTC month of dateVar as a number from 0 to 11.

Usage

This method returns the UTC month of dateVar as a number from 0 through 11. January is 0, and December is 11.

Example

This code fragment displays 5, the month portion of the date (determined by adding 1 to the value returned by getMonth), followed by the GMT equivalent (determined by adding 1 to the value returned by getUTCMonth), which is probably the same.

var aDate = new Date("May 1, 2001 13:24:35");
var locMo = aDate.getMonth() + 1;
var GMTMo = aDate.getUTCMonth() + 1
TheApplication().RaiseErrorText("Local month: " + locMo +"\nGMT month: "
   + GMTMo);

See Also

getMonth() Method
setUTCMonth() Method

Siebel eScript Language Reference