JavaScript Date getDay() Method JavaScript Date getDay() The getDay() method returns the day of the week (0 to 6) of a date.
Sunday 0, Monday 1, .
(See below): Syntax.
Parameters.
Return Value.
Type Description A number JavaScript Date getDay() The getDay() method returns the day of the week (0 to 6) of a date.
Sunday 0, Monday 1, .
(See below): Syntax.
Parameters.
Return Value.
Type Description A number The day of the week (0 to 6).
More Examples.
Get the name of the weekday (not just a number): const weekday Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday", const d new Date(), let day weekdayd.getDay(), Related Pages: Browser Support.
getDay() is an ECMAScript1 (ES1) feature.
ES1 (JavaScript 1997) is fully supported in all browsers: Chrome Edge Firefox Safari Opera IE Yes Yes Yes Yes Yes Yes.
COLOR PICKER.
Contact Sales.
If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail: salesw3schools.com.
Report Error.
If you want to report an error, or if you want to make a suggestion, send us an e-mail: helpw3schools.com.
Top Tutorials.
Top References.
Top Examples.
Get Certified.
W3Schools is optimized for learning and training.
Examples might be simplified to improve reading and learning.
Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content.
While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy." JavaScript Date getDay() Method JavaScript Date getDay() The getDay() method returns the day of the week (0 to 6) of a date.
Sunday 0, Monday 1, .
(See below): Syntax.
Parameters.
Return Value.
Type Description A number JavaScript Date getDay() The getDay() method returns the day of the week (0 to 6) of a date.
Sunday 0, Monday 1, .
(See below): Syntax.
Parameters.
Return Value.
Type Description A number The day of the week (0 to 6).
More Examples.
Get the name of the weekday (not just a number): const weekday Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday", const d new Date(), let day weekdayd.getDay(), Related Pages: Browser Support.
getDay() is an ECMAScript1 (ES1) feature.
ES1 (JavaScript 1997) is fully supported in all browsers: Chrome Edge Firefox Safari Opera IE Yes Yes Yes Yes Yes Yes.
COLOR PICKER.
Contact Sales.
If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail: salesw3schools.com.
Report Error.
If you want to report an error, or if you want to make a suggestion, send us an e-mail: helpw3schools.com.
Top Tutorials.
Top References.
Top Examples.
Get Certified.
W3Schools is optimized for learning and training.
Examples might be simplified to improve reading and learning.
Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content.
While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy." JavaScript Date getDay() Method JavaScript Date getDay() The getDay() method returns the day of the week (0 to 6) of a date.
Sunday 0, Monday 1, .
(See below): Syntax.
Parameters.
Return Value.
Type Description A number JavaScript Date getDay() The getDay() method returns the day of the week (0 to 6) of a date.
Sunday 0, Monday 1, .
(See below): Syntax.
Parameters.
Return Value.
Type Description A number The day of the week (0 to 6).
More Examples.
Get the name of the weekday (not just a number): const weekday Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday", const d new Date(), let day weekdayd.getDay(), Related Pages: Browser Support.
getDay() is an ECMAScript1 (ES1) feature.
ES1 (JavaScript 1997) is fully supported in all browsers: Chrome Edge Firefox Safari Opera IE Yes Yes Yes Yes Yes Yes.
COLOR PICKER.
Contact Sales.
If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail: salesw3schools.com.
Report Error.
If you want to report an error, or if you want to make a suggestion, send us an e-mail: helpw3schools.com.
Top Tutorials.
Top References.
Top Examples.
Get Certified.
W3Schools is optimized for learning and training.
Examples might be simplified to improve reading and learning.
Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content.
While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy." JavaScript Date getDay() Method JavaScript Date getDay() The getDay() method returns the day of the week (0 to 6) of a date.
Sunday 0, Monday 1, .
(See below): Syntax.
Parameters.
Return Value.
Type Description A number JavaScript Date getDay() The getDay() method returns the day of the week (0 to 6) of a date.
Sunday 0, Monday 1, .
(See below): Syntax.
Parameters.
Return Value.
Type Description A number The day of the week (0 to 6).
More Examples.
Get the name of the weekday (not just a number): const weekday Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday", const d new Date(), let day weekdayd.getDay(), Related Pages: Browser Support.
getDay() is an ECMAScript1 (ES1) feature.
ES1 (JavaScript 1997) is fully supported in all browsers: Chrome Edge Firefox Safari Opera IE Yes Yes Yes Yes Yes Yes.
COLOR PICKER.
Contact Sales.
If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail: salesw3schools.com.
Report Error.
If you want to report an error, or if you want to make a suggestion, send us an e-mail: helpw3schools.com.
Top Tutorials.
Top References.
Top Examples.
Get Certified.
W3Schools is optimized for learning and training.
Examples might be simplified to improve reading and learning.