Bookshelf Home | Contents | Index | Search | PDF |
Siebel eScript Language Reference > Siebel eScript Commands > The Date Object >
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, 2001, both locally and in universal time.
function Button2_Click ()
{
var localDay;
var UTCDay;
var MayDay = new Date("May 1, 2001 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, 2001, 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
Bookshelf Home | Contents | Index | Search | PDF |
Siebel eScript Language Reference Published: 18 April 2003 |