Forum Moderators: open
dayy1=dey1.value*1;
dayy2=dey2.value*1;
mnt1=m1.value*1;
mnt2=m2.value*1;
yr1=yr1*1;
yr2=yr2*1;
pesach1=howmany(mnt1);
// get the number of days for each month
pesach2=howmany(mnt2);
if (rangeCheck(dayy1,pesach1)&&rangeCheck(dayy2,pesach2))
// do range checks for each month
{
mnt1--;// the date function runs from 0-11. months are numbered 1-12.
mnt2--;//adjust the month values to fit the javascript function
[b] lday = new Date(yr1,mnt1,dayy1,12,12,12,12);[/b] //create a new date object for each part of the problem
rday=new Date(yr2,mnt2,dayy2,12,12,12,12);
alert(lday.toDateString()+" "+rday.toDateString())
//Calculate difference btw the two dates, and convert to days
//document.write(Math.ceil((christmas.getTime()-today.getTime())/(one_day))+
//" days left until Christmas!")
vive=(Math.ceil((lday.getTime()-rday.getTime())));
vive=vive/one_day;