getUTCDay (JavaScript)

Gets the day of week in UTC.

Defined in

Date (Standard - JavaScript)

Syntax

getUTCDay() : int
Return value Description
int The day of the week where 0 is Sunday.

Examples

This computed label gets the day of the week and displays it as a string.
var date = new Date();
var day;
switch(date.getUTCDay()) {
	case 0 : day = "Sunday"; break;
	case 1 : day = "Monday"; break;
	case 2 : day = "Tuesday"; break;
	case 3 : day = "Wednesday"; break;
	case 4 : day = "Thursday"; break;
	case 5 : day = "Friday"; break;
	case 6 : day = "Saturday"; break; }
day + ", " + date.toUTCString()