function isDateNumber(strNum,method){
    var str = new String(strNum);
    var i = 0;

    if (isNaN(parseInt(str)) || parseInt(str) < 0) return false;

    if (method == 2)
        if (parseInt(str) > 31)
            return false;
    if (method == 1)
        if (parseInt(str) > 12)
            return false;

    for (i = 0; i < str.length; i++)
        if (str.charAt(i) < '0' || str.charAt(i) > '9')
            return false;


    return true;
}
/* PURPOSE:  Returns true if the string is a valid date number.
	A method is passed in (1 = month, 2 = day).  If the string is
	nonnumeric, false is passed back.  If the day in the date string
	is greater than 31, false is returned.  If the month is greater
	than 12, an error is returned.
*/
Returns true if the string is a valid date number.
A method is passed in (1 = month, 2 = day).  If the string is
nonnumeric, false is passed back.  If the day in the date string
is greater than 31, false is returned.  If the month is greater
than 12, an error is returned.
Returns true if the string is a valid date number . A method is passed in ( 1 = month 2 = day ) . If the string is nonnumeric false is passed back . If the day in the date string is greater than 31 false is returned . If the month is greater than 12 an error is returned .
function isDateNumber(strNum,method){
    var str = new String(strNum);
    var i = 0;
    if (isNaN(parseInt(str)) || parseInt(str) < 0) return false;
    if (method == 2)
        if (parseInt(str) > 31)
            return false;
    if (method == 1)
        if (parseInt(str) > 12)
            return false;
    for (i = 0; i < str.length; i++)
        if (str.charAt(i) < '0' || str.charAt(i) > '9')
            return false;
    return true;
}
function isDateNumber ( strNum , method ) { var str = new String ( strNum ) ; var i = 0 ; if ( isNaN ( parseInt ( str ) ) || parseInt ( str ) < 0 ) return false ; if ( method == 2 ) if ( parseInt ( str ) > 31 ) return false ; if ( method == 1 ) if ( parseInt ( str ) > 12 ) return false ; for ( i = 0 ; i < str . length ; i ++ ) if ( str . charAt ( i ) < '0' || str . charAt ( i ) > '9' ) return false ; return true ; }
PURPOSE:  Returns true if the string is a valid date number.
PURPOSE : Returns true if the string is a valid date number .