JavaScript Date getUTCDay() methodThe JavaScript date getUTCDay() method returns the value of day of the week for the specified date on the basis of universal time. The value of the day starts with 0 that represents Sunday. SyntaxThe getUTCDay() method is represented by the following syntax: ReturnAn integer value between 0 and 6 that represents the days of the week for the specified date. JavaScript Date getUTCDay() method exampleHere, we will understand getUTCDay() method through various examples. Example 1Let's see an example to print the value of today's weekday according to universal time. Test it NowOutput: Day value : 3 Example 2Let's see an example to print the value of weekday from the given date according to universal time. Test it NowOutput: Day value : 5 Day value : 6 Next TopicJavaScript Date |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India