jsdouble result;
MakeDay(jsdouble year, jsdouble month, jsdouble date){    jsdouble result;    JSBool leap;    jsdouble yearday;    jsdouble monthday;    year += floor(month / 12);    month = fmod(month, 12.0);    if (month < 0)        month += 12;    leap = (DaysInYear((jsint) year) == 366);    yearday = floor(TimeFromYear(year) / msPerDay);    monthday = DayFromMonth(month, leap);    result = yearday             + monthday             + date - 1;    return result;}