You probably got no response because this is a pretty extensive program in JS.
Here is some code that I found.
[tt]
function isValidDate(date2check){
// dgk-10/07/00
// determines if the date string passed represents a valid date.
// returns 0 if the date is valid
// returns 1 if the date is not in the format of mm/dd/ccyy, mm-dd-ccyy, or mmddccyy
// m/d/ccyy & m-d-ccyy are also acceptable
// returns 2 if the date is not a legal date (i.e. 02/30/1999)
var retval = 0
var aMMDDCCYY
var dtest
// use a regular expression pattern match to determine if the date format is valid
if (/^(\d\d?-\d\d?-\d{4})|(\d\d?\/\d\d?\/\d{4})|(\d{8})$/.test(date2check)){
dtest = new Date(date2check);
if (/\//.test(date2check)){
aMMDDCCYY = date2check.split("/"

;
}else{
if (/-/.test(date2check)){
aMMDDCCYY = date2check.split("-"

;
}else{
aMMDDCCYY = Array(date2check.substr(0,2), date2check.substr(2,2), date2check.substr(4,4))
dtest = new Date(aMMDDCCYY[0] + "/" + aMMDDCCYY[1] + "/" + aMMDDCCYY[2]);
}
}
if (dtest.getMonth() + 1 != aMMDDCCYY[0] || dtest.getDate() != aMMDDCCYY[1] || dtest.getFullYear() != aMMDDCCYY[2]){
retval = 2
}
}else{
retval = 1
}
return retval
}
function StdDateFormat(strDate){
// dgk-10/07/00
// receives a date string in the format of mm/dd/ccyy, mm-dd-ccyy, or mmddccyy
// returns a date string in the standard format: mm/dd/ccyy.
var retval = ""
var aMMDDCCYY
if (isValidDate(strDate) == 0){
if (/\//.test(strDate)){
retval = strDate;
}else{
if (/-/.test(strDate)){
aMMDDCCYY = strDate.split("-"

;
}else{
aMMDDCCYY = Array(strDate.substr(0,2), strDate.substr(2,2), strDate.substr(4,4));
}
retval = (aMMDDCCYY[0] + "/" + aMMDDCCYY[1] + "/" + aMMDDCCYY[2]);
}
}
return retval;
}
[/tt]
Hope this helps,
-Vic vic cherubini
malice365@hotmail.com
====
Knows: Perl, HTML, JavScript, C/C++, PHP, Flash, Director
====