Siebel eScript Language Reference > Siebel eScript Commands > Universal Time Methods >
getUTCDay() Method
This method returns the UTC day of the week of a Date object. Syntax
dateVar.getUTCDay()
Returns
The UTC day of the week of dateVar as a number from 0 to 6. Usage
This method returns the UTC day of the week of dateVar as a number from 0 to 6. Sunday is 0, and Saturday is 6. Example
This function displays the day of the week of May 1, 2005, both locally and in universal time. function Button2_Click () { var localDay; var UTCDay; var MayDay = new Date("May 1, 2005 13:30:35"); var weekDay = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
for (var i = 0; i <= MayDay.getDay();i++) localDay = weekDay[i]; var msgtext = "May 1, 2005, 1:30 PM falls on " + localDay;
for (var j = 0; j <= MayDay.getUTCDay(); j++) UTCDay = weekDay[j]; msgtext = msgtext + " locally, \nand on " + UTCDay + " GMT.";
TheApplication().RaiseErrorText(msgtext); }
See Also
getDay() Method
|