![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to return the day of the week in the specified date according to universal time?
JavaScript date getUTCDay() method returns the day of the week in the specified date according to universal time. The value returned by getUTCDay() is an integer corresponding to the day of the week: 0 for Sunday, 1 for Monday, 2 for Tuesday, and so on.
Example
You can try to run the following code to return the day of the week in the specified date −
<html> <head> <title>JavaScript getUTCDay Method</title> </head> <body> <script> var dt = new Date( "January 15, 2018 20:15:20" ); document.write("getUTCDay() : " + dt.getUTCDay() ); </script> </body> </html>
Advertisements