Language Reference getDay Method


Description

The getDay method is used to retrieve the day of the week represented by the date stored in the Date object.

Syntax

var intDay = dateObj.getDay( )

Return Value

An integer between 0 and 6 representing the day of the week.

Arguments

The getDay method has no arguments.

Remarks

The integer returned from the getDay method corresponds to a day of the week as follows:

0 = Sunday
1 = Monday
2 = Tuesday
3 = Wednesday
4 = Thursday
5 = Friday
6 = Saturday