Date.getDay

getDay – Get the day of the week, according to local time (0–6).

Description

Date.getDay()

Get the day of week, 0 (Sunday) to 6 (Saturday).

Return values

Integer

Examples

Example #1 – getDay example
var date = new Date(2015, 9, 21, 16, 29, 00); console.log(date.getDay()); // 3 console.log(new Date().getDay()); // Gets the current day of the week.

External references