[script language = "Javascript"] /*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--* * PURPOSE: Test if a particular year is a leap year. This function does not take into account the beginning of the gregorian calendar which occured some time in the middle ages. It returns a boolean value. * DOCUMENTED AT: http://www.geocities.com/matth3wbishop/eg/javascript/ * DEPENDENCIES: [none] * SOURCE CODE: http://www.geocities.com/matth3wbishop/eg/javascript/ * STATUS: working * NOTES: This function is used by the fnDatePicker() asp function to prevent illegal dates being chosen. --*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*/ function fnIsLeapYear(iYear) { var regYear = /\d{4}/gi; var bIsLeapYear = new Boolean(); if ((iYear % 4) == 0) { if ((iYear % 100) != 0) {bIsLeapYear = true;} } /* if */ return bIsLeapYear; } /* fnIsLeapYear */ [/script]