Hi Jake, thanks for the response,
I actually have looked into the code, and i figured out the reulsts part I
think:
// parse date into variables
if (format.charAt(0)=="d"){ //what format does the server use for
dates?
results[0] = matchArray[1];
results[1] = matchArray[3];
results[2] = matchArray[4];
} else if (format.charAt(0)=="m"){
results[0] = matchArray[3];
results[1] = matchArray[1];
results[2] = matchArray[4];
} else if (format.charAt(0)=="y"){
//putting in the yyyy in [2], mm in [1],etc..
results[0] = matchArray[1]; results[1] = matchArray[3];
results[2] = matchArray[4];
}
return results;
}
I have also figured out that my problem lies in the datPat variable, but I am
not able to understand the syntax of it... ref :
var datePat = /^(\d{1,2})(\/|-)(\d{1,2})\2(\d{4})$/;
could you please take a moment to explain the syntax?
Hi Jake, thanks for the response, I actually have looked into the code, and i figured out the reulsts part I think: // parse date into variables if (format.charAt(0)=="d"){ //what format does the server use for dates? results[0] = matchArray[1]; results[1] = matchArray[3]; results[2] = matchArray[4]; } else if (format.charAt(0)=="m"){ results[0] = matchArray[3]; results[1] = matchArray[1]; results[2] = matchArray[4]; } else if (format.charAt(0)=="y"){ //putting in the yyyy in [2], mm in [1],etc.. results[0] = matchArray[1]; results[1] = matchArray[3]; results[2] = matchArray[4]; } return results; } I have also figured out that my problem lies in the datPat variable, but I am not able to understand the syntax of it... ref : var datePat = /^(\d{1,2})(\/|-)(\d{1,2})\2(\d{4})$/; could you please take a moment to explain the syntax?
regards Ib