var str = "Fri Feb 14 2014 19:14:32 GMT+0800 (HKT)"
var _date = new Date(Date.parse(str.replace(reg, "")))
var _month = String(_date.getMonth()+1).length > 1 ? (_date.getMonth()+1) : "0"+(_date.getMonth()+1)
var _day = String(_date.getDate()).length > 1 ? (_date.getDate()) : "0"+(_date.getDate())
var _hour = String(_date.getHours()).length > 1 ? (_date.getHours()) : "0"+(_date.getHours())
var _minute = String(_date.getMinutes()).length > 1 ? (_date.getMinutes()) : "0"+(_date.getMinutes())
var _seconds = String(_date.getSeconds()).length > 1 ? (_date.getSeconds()) : "0"+(_date.getSeconds())
var _mm = parseInt(_hour) > 12 ? "下午":"上午"
var result = _date.getFullYear()+"-"+_month +"-"+_day +" "+_mm+" "+_hour+":"+_minute+":"+_seconds
var str ='2012/08/12 下午 04:13:15'var date = new Date(str.replace(/[^\d]+/g,','))
console.log(date)