jquery字符串转日期
$(function() {
//字符串转日期格式,strDate要转为日期格式的字符串
function getDate(strDate) {
var date = eval('new Date(' + strDate.replace(/\d+(?=-[^-]+$)/,
function(a) {
return parseInt(a, 10) - 1;
}).match(/\d+/g) + ')');
console.log(date);
}
getDate("1902-02-13");
})