Debt Consolidation - Kamala - Debt Consolidation - Myspace Layouts - Debt Consolidation

PDA

View Full Version : how to check weekend&holiday


sela cullens
Apr 29th 2009, 11:25 pm
hi,, I need help with javascript.
I have 1 form & 2 Text(startDate, endDate). The text will be use to check the date, if are have weekend or holiday or not..
if I input starDate="12/19/2009" & end Date="12/26/2009" ,if i have done input endDate, then system will be run if in that date have weekend and/ or holiday the result will explain which date are holiday and/or weekend. if dont have holiday or weekend the result : no weekend or holiday in that date.
so this process dont need click submit for run the process. this process will be take at onKeyUp.

please Help me.

in2clearsky
Apr 30th 2009, 1:40 am
For weekend, you can use getDay() method of date object. 0 is Sun and 6 is Sat. See more detail here:
http://www.w3schools.com/jsref/jsref_getDay.asp

For holiday, i think you need holiday database as it vary from time to time.

JavaScriptBank.com
May 1st 2009, 6:52 pm
some holiday JavaScripts (http://www.google.com.vn/search?hl=vi&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=ki4&q=holiday+site%3Ahttp%3A%2F%2Fwww.javascriptbank.com&btnG=T%C3%ACm+ki%E1%BA%BFm&meta=) maybe you need