English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

JavaScript getUTCDay() method

 JavaScript Date Object

getUTCDay()Returns the day of the week (0-6)

getUTCDay()The returned value is an integer corresponding to the day of the week: 0 represents Sunday,1represents Monday, and so on.

Coordinated Universal Time (UTC) is the standard time set for world time.

For a specific day of the month, please refer togetUTCDate()method.

Syntax:

date.getUTCDay()
var d = new Date();
d.getUTCDay();
Test and see‹/›

Browser Compatibility

All browsers fully support the getUTCDay() method:

Method
getUTCDay()isisisisis

Technical Details

Return Value:0 to6are integers between
JavaScript Version:ECMAScript 1

More Examples

Return the day of the week for a specific date and time:

var d = new Date(#39;August 20, 1999 23:15:3039;);
d.getUTCDay();
Test and see‹/›

The Today variable saves the date name:

var arr = [39;Sun39,39;Mon39,39;Tue39,39;Wed39,39;Thu39,39;Fri39,39;Sat39;];
var d = new Date();
var today = arr[d.getUTCDay()];
Test and see‹/›

 JavaScript Date Object