How to get day name in Javascript
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.