Hi guys,
Sorry of this has been asked before, I searched and looked in the Faq but couldn't find the answer.
I have 3 javascript date objects, dateToCheck, startDate, endDate
I need to check if dateToCheck falls between startDate and the endDate.
I have this but it doesn't seem to work:
if dateToCheck > startDate && dateToCheck < endDate {
then do something......
else
do somethign else
the if statement always fails, it doesn't give me any error that I can see, and when I view the dates it they are correct. how do I compare them?
Thanks in advance
Sorry of this has been asked before, I searched and looked in the Faq but couldn't find the answer.
I have 3 javascript date objects, dateToCheck, startDate, endDate
I need to check if dateToCheck falls between startDate and the endDate.
I have this but it doesn't seem to work:
if dateToCheck > startDate && dateToCheck < endDate {
then do something......
else
do somethign else
the if statement always fails, it doesn't give me any error that I can see, and when I view the dates it they are correct. how do I compare them?
Thanks in advance