Standard built-ins

Date.prototype.getUTCDay()

Try the free JavaScript compiler

UTC weekday number (Sunday is 0). Invalid date returns NaN. Local methods use host zone; example constructs local calendar fields.

Formal Syntax & Structure

javascript syntaxjavascript
date.getUTCDay()

Return Value

Number

Calendar field or NaN.

Working Example

Example Snippetjavascript
console.log((new Date("2024-01-02T03:00:00Z")).getUTCDay());
JavaScript Reference