Library code snippets
Display the Current Day of the Week
Demonstrates how to display the current day of the week.
<script language="javascript">
var DayOfWeek;
function fncDayOfWeek()
{
var stDate;
var now;
var assoc= new Array(7);
assoc[0]="Sunday";
assoc[1]="Monday";
assoc[2]="Tuesday";
assoc[3]="Wednesday";
assoc[4]="Thursday";
assoc[5]="Friday";
assoc[6]="Saturday";
now= new Date();
stDate=now.getDay();
return(assoc[stDate]);
}
document.write('<B>Current Day of the Week:</b>' + DayOfWeek);
</script>
Related articles
Related discussion
-
An old chestnut: Scrolling DIVs. Can I use onmouseover/onmouseout?
by Skunk (1 replies)
-
code highlighting using jquery
by pjm (1 replies)
-
Problem when using TemplateField and ImageButton
by mhuff84 (14 replies)
-
dropdownlist for country,state and city
by jack_tom (2 replies)
-
popup window in vb.net... how it's work?..
by yf2009 (6 replies)
Related podcasts
-
jQuery in ASP.NET
In this episode Chris Brandsma, Rick Strahl, Dave Ward, Bertrand Le Roy, Scott Koon, and Steven Harman discuss Microsoft's jQuery in ASP.NET announcement.This episode of the Alt.NET Podcast is brought to you by LLBLGen Pro, the most mature O/R mapper and code generator out there.Are you loo...
Events coming up
-
Oct
28
Web Standards Group (Sydney)
North Sydney, Australia
TBA
Current Day of the Week: undefined
Any way to fix this?
-- May
This thread is for discussions of Display the Current Day of the Week.