View Single Post
  #2   Spotlight this post!  
Unread 10-01-2010, 18:59
DMetalKong's Avatar
DMetalKong DMetalKong is offline
Registered User
AKA: David K.
no team
Team Role: College Student
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Bridgewater
Posts: 144
DMetalKong is a jewel in the roughDMetalKong is a jewel in the roughDMetalKong is a jewel in the rough
Send a message via AIM to DMetalKong
Re: Help with calendar

First of all, let me point you to the w3schools website. They have a lot of useful tutorials on web-related topics - for your case they have a good date object reference.

Second, you can use the getDay() method along with a switch statement to do what you want. See below

Code:
var d = new Date();
switch(d.getDay()) {
    case 0:
        //do Sunday stuff here
        break;
    case 1:
        //do Monday stuff here
        break;
    //...
    //...
    case 6:
        //do Saturday stuff here
        break;
}
Hope that helps.

Last edited by DMetalKong : 10-01-2010 at 19:01. Reason: Fix links