javaScript: getUTCDay() Method By Examples

JavaScript: Date.getUTCDay() method. In this tutorial, you will learn how to get UTC day of the week in javascript with an example.

javaScript: getUTCDay() Method

Definition:- Javascript getUTCDay() method is used to get the day of week for the specified date according to universal time. The getUTCDay method will return an integer value between 0 and 6.

Syntax

 Date.getUTCDay()

Note: Sunday is 0, Monday is 1, Tuesday is 2 and so on.

Example

Now we will take an example of getUTCDay() method:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JavaScript date.getUTCDay Method</title>
</head>
<body>
  <script type = "text/javascript">
     var currentDate = new Date();
     document.write("the javascript date.getUTCDay() : " + currentDate.getUTCDay() );
  </script>
</body>
</html>

Result of the above code is

JavaScript date.getUTCDay Method

Conclusion

In this javascript tutorial, you have learned how to get a day using getUTCDay function with example.

You may like

  1. JavaScript: Date.getUTCDate() Method
  2. javaScript: getUTCFullYear Method
  3. getUTCMonth Method in JavaScript
  4. javaScript Digital Clock with date
  5. JavaScript: Set Date Methods
  6. String Contains JavaScript | String includes() Method
  7. JavaScript Get Date Methods
  8. JavaScript Operators With Examples
  9. Sorting Using JavaScript Array Sort() Method
  10. JavaScript Replace String With Examples
  11. JavaScript Array splice() Method By Example
  12. JavaScript: Clone an Array & Object By Example

If you have any questions or thoughts to share, use the comment form below to reach us.

AuthorDevendra Dode

Greetings, I'm Devendra Dode, a full-stack developer, entrepreneur, and the proud owner of Tutsmake.com. My passion lies in crafting informative tutorials and offering valuable tips to assist fellow developers on their coding journey. Within my content, I cover a spectrum of technologies, including PHP, Python, JavaScript, jQuery, Laravel, Livewire, CodeIgniter, Node.js, Express.js, Vue.js, Angular.js, React.js, MySQL, MongoDB, REST APIs, Windows, XAMPP, Linux, Ubuntu, Amazon AWS, Composer, SEO, WordPress, SSL, and Bootstrap. Whether you're starting out or looking for advanced examples, I provide step-by-step guides and practical demonstrations to make your learning experience seamless. Let's explore the diverse realms of coding together.

Leave a Reply

Your email address will not be published. Required fields are marked *