Date.getUTCDay()
Returns the day of the week, according to universal time (from 0-6)
var date1 = new Date('August 19, 1975 23:15:30 GMT+11:00');
var date2 = new Date('August 19, 1975 23:15:30 GMT-11:00');
// Tuesday
console.log(date1.getUTCDay());
// expected output: 2
// Wednesday
console.log(date2.getUTCDay());
// expected output: 3
Syntax
dateObj.getUTCDay()Examples
Using getUTCDay()
getUTCDay()References
Contributors to this page
Last updated