Android 2.3 Version number parsing error, split and parseint will both 09 and 08 are parsed into 0, 07 the following parsing no problem. The solution is to take single digits directly.
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));Optimized for Android 2.3. Parse error. Will parse 09 and 08 into 0, 07 below parse no problem. The solution is to take single digits directly.
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 parsing no problem. The solution is to take single digits directly. Otherwise, split and parseint have problems.
Darray.push (yyyy);
Darray.push (MM);
Darray.push (DD);
return darray;
}
Android 2.3 js parsing problem split ()