K
Kevin Duggan
Here is the URL of my page:
http://www.kevsblues.com/CATER/din.html
________________________________________
I can not understand how to get this so the page
reads "Only 9 days till Thanksgiving"
or whatever the date may be. (Xmass ect....)
I could not get this to work
so I put the
"Leave the Party to KevsBlues Catering"
I have a funny feeling there may lie the problem...
But
any help please
Thanks
Kevin
______________________________________
var holidayCntMsg = "Leave the party to KEVSBLues Catering"
var curDay = new Date()
var tMonth = curDay.getMonth()
function HolidayDays() {
switch (tMonth) {
case 2:
var tHoliday = new Date("March 17, 2001")
var curHoliday = tHoliday.getTime()-curDay.getTime()
if (curHoliday > 0) {
curHoliday = Math.ceil(curHoliday / (1000*60*60*24))
holidayCntMsg = "Only " +curHoliday+ " days until St. Patrick's Day!"
}
break
case 6:
var tHoliday = new Date("July 4, 2001")
var curHoliday = tHoliday.getTime()-curDay.getTime()
if (curHoliday > 0) {
curHoliday = Math.ceil(curHoliday / (1000*60*60*24))
holidayCntMsg = "Only " +curHoliday+ " days until the 4<sup>th</sup> of July!"
}
break
case 9:
var tHoliday = new Date("October 31, 2001")
var curHoliday = tHoliday.getTime()-curDay.getTime()
if (curHoliday > 0) {
curHoliday = Math.ceil(curHoliday / (1000*60*60*24))
holidayCntMsg = "Only " +curHoliday+ " days until Halloween!"
}
break
case 10:
var tHoliday = new Date("November 22, 2001")
var curHoliday = tHoliday.getTime()-curDay.getTime()
if (curHoliday > 0) {
curHoliday = Math.ceil(curHoliday / (1000*60*60*24))
holidayCntMsg = "Only " +curHoliday+ " days until Thanksgiving!"
}
break
case 11:
var tHoliday = new Date("December 25, 2001")
var curHoliday = tHoliday.getTime()-curDay.getTime()
if (curHoliday > 0) {
curHoliday = Math.ceil(curHoliday / (1000*60*60*24))
holidayCntMsg = "Only " +curHoliday+ " days til CHRISTMAS!"
}
break
}
return holidayCntMsg
}
http://www.kevsblues.com/CATER/din.html
________________________________________
I can not understand how to get this so the page
reads "Only 9 days till Thanksgiving"
or whatever the date may be. (Xmass ect....)
I could not get this to work
so I put the
"Leave the Party to KevsBlues Catering"
I have a funny feeling there may lie the problem...
But
any help please
Thanks
Kevin
______________________________________
var holidayCntMsg = "Leave the party to KEVSBLues Catering"
var curDay = new Date()
var tMonth = curDay.getMonth()
function HolidayDays() {
switch (tMonth) {
case 2:
var tHoliday = new Date("March 17, 2001")
var curHoliday = tHoliday.getTime()-curDay.getTime()
if (curHoliday > 0) {
curHoliday = Math.ceil(curHoliday / (1000*60*60*24))
holidayCntMsg = "Only " +curHoliday+ " days until St. Patrick's Day!"
}
break
case 6:
var tHoliday = new Date("July 4, 2001")
var curHoliday = tHoliday.getTime()-curDay.getTime()
if (curHoliday > 0) {
curHoliday = Math.ceil(curHoliday / (1000*60*60*24))
holidayCntMsg = "Only " +curHoliday+ " days until the 4<sup>th</sup> of July!"
}
break
case 9:
var tHoliday = new Date("October 31, 2001")
var curHoliday = tHoliday.getTime()-curDay.getTime()
if (curHoliday > 0) {
curHoliday = Math.ceil(curHoliday / (1000*60*60*24))
holidayCntMsg = "Only " +curHoliday+ " days until Halloween!"
}
break
case 10:
var tHoliday = new Date("November 22, 2001")
var curHoliday = tHoliday.getTime()-curDay.getTime()
if (curHoliday > 0) {
curHoliday = Math.ceil(curHoliday / (1000*60*60*24))
holidayCntMsg = "Only " +curHoliday+ " days until Thanksgiving!"
}
break
case 11:
var tHoliday = new Date("December 25, 2001")
var curHoliday = tHoliday.getTime()-curDay.getTime()
if (curHoliday > 0) {
curHoliday = Math.ceil(curHoliday / (1000*60*60*24))
holidayCntMsg = "Only " +curHoliday+ " days til CHRISTMAS!"
}
break
}
return holidayCntMsg
}