function stringToDate(fDate){
var fullDate = fDate.split("
")[0].split("-");
var fullTime = fDate.split(" ")[1].split(":");
return new Date(fullDate[0], fullDate[1]-1, fullDate[2], (fullTime[0] !=
null ? fullTime[0] : 0), (fullTime[1] != null ? fullTime[1] : 0), (fullTime[2]
!= null ? fullTime[2] : 0));
}
原文地址:http://www.cnblogs.com/tancp/p/3718126.html