User Id :    Password :      New Member   Forgot Password
 
How to get day name in Javascript
Description Here i will show you how to get day name in javascript.   No. of Views     1362
  Rating     0
Author Najmul Hoda   Posted On     15 Aug 2011
Tags Java Script    

Sample Code   Download Code

 

This is very common use in our day to day programming to get current day name.

In this codesnippet i will show you how to get current day name in javascript.

 

var arrDaysName= new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
var curDay = new Date();
alert(arrDaysName[curDay.getDay()]);

 

Here  var curDay = new Date() will return current date and getDay() will return current day

and arrDaysName[curDay.getDay()] will return the current day name.

 

About Author

About Author He is a .Net developer having 4+ years of experience. He loves writting technical article for .Net developers. Najmul Hoda
No Photo
 
Country India
Company BirlaSoft
Home Page www.dotnetlogix.com

Rate this article

Rating options from poor, fair, good, very good to excelent.  
 

Comments

 
 
Posted By Annonymous on 02 Sep 2011 at 03:46 PM
 
What a great rseoucre this text is.
 
 
     
Write your comment here.  
Comment
Verification Code   
  
    
 
Section sponsored by