detect date to select css style sheet

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jorntk

    #1

    detect date to select css style sheet

    how can i use javascript to detect the current date to select css style
    sheet so that the color style of the site is different every day like
    wired.com?

    --
    Thanks and Regards

    Jorn


  • Shawn Milo

    #2
    Re: detect date to select css style sheet

    "Jorntk" <jorntk@yahoo.c om> wrote in message news:<40922ff4_ 2@news.tm.net.m y>...[color=blue]
    > how can i use javascript to detect the current date to select css style
    > sheet so that the color style of the site is different every day like
    > wired.com?[/color]

    It seems that you could do something simple like:

    var dToday = new Date;

    That will create a variable containing the current date/time.

    You can then use one of the following:

    dToday.getMonth ()
    dToday.getDate( )
    dToday.getDay()

    You can then select a stylesheet by day of week, day of month, or month,
    depending upon your preference.

    Shawn

    Comment

    Working...