Jump to content

Merkaba_81

Members
  • Posts

    2
  • Joined

  • Last visited

Merkaba_81's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Well... i think i got it. i guess i just wasn't using quotes at all yesturdayDaysTill(11,25,"Christmas!")this works just fine today... i guess i was just sleepy. anyways Thanks for the help aspnetguy!
  2. ok... all i'm trying to do is use a funtion to help return the number of days left until an occasion... like christmas for example. now the script works perfectly, but i want to make it easier and wrap it up in a function... but, the function doesn't work... mabye you can help ?? function DaysTill(MONTH,DAY,NAME){today=new Date()var occasion=new Date(today.getFullYear(), MONTH, DAY)if (today.getMonth()>=MONTH && today.getDate()>DAY){occasion.setFullYear(occasion.getFullYear()+1)}var one_day=1000*60*60*24document.write(Math.ceil((occasion.getTime()-today.getTime())/(one_day))+ " days left until " + NAME)}
×
×
  • Create New...