How to Display Day of Week in Javascript

How to display day of week in Javascript.

In my previous tutorial i  explained how to get current date and time in javascript. In previous tutorial i discussed about date object. Let’s quickly revise it.

How to Display Day of Week in Javascript

Let’s create a date object.

Date provides getDay() method which returns the day number of the week, starting with Sunday on 0 (zero) and so on.

Today is Friday so if i use this method it will return 5.

 

How to Print Name of the WeekDay using  Javascript

Let’s create a simple method which prints the name of week day.

How to create an array in javascript.

Print Day of Week using Date in Javascript

Suppose if i enter following date 10/11/2009, print the day of week on the input date.

Tagged , , . Bookmark the permalink.

About WebRewrite

I am technology lover who loves to keep updated with latest technology. My interest field is Web Development.