Android 2.3 version parsing error, split and parseint will both 09 and 08 are resolved to 0, 07 the following resolution is no problem, the solution is to directly take single digits.
function Getymd (yMd) {
var darray=new Array ();
var yyyy=parseint (Ymd.tostring (). Split ("-") [0]);
var mm=parseint (Ymd.tostring (). Split ("-") [1]);
var dd=parseint (Ymd.tostring (). Split ("-") [2]);
if (mm==0) {
Mm=parseint (ymd.substring (6,7));For Android 2.3 optimization, parsing errors, will be 09 and 08 are resolved to 0, 07 the following resolution is no problem, the solution is to directly take single digits. Otherwise, split and parseint have problems.
}
if (dd==0)
Dd=parseint (ymd.substring (9,10));For Android 2.3 optimization, parsing errors, will be 09 and 08 are resolved to 0, 07 the following resolution is no problem, the solution is to directly take single digits. Otherwise, split and parseint have problems.
Darray.push (yyyy);
Darray.push (MM);
Darray.push (DD);
return darray;
}