A: Thu Dec 29 2016 11:12:16 GMT+0800 (中国标准时间) ==> B: "2016-12-29 10:59:58"
B = $filter('date')(A,'yyyy-MM-dd HH:mm:ss')
A: 140284800000 ==> B: "1974-06-13"
B = $filter('date')(A, 'yyyy-MM-dd')
A: "2016-12-30 10:59:58" ==> B: Fri Dec 30 2016 10:59:58 GMT+0800 (中国标准时间)
B = convertDate(A);
var convertDate = function (startDateTime) {
if (startDateTime) {
if (!(startDateTime instanceof Date)) {
startDateTime = new Date(startDateTime);
}
}
return startDateTime;
};
A: Thu Dec 29 2016 11:10:00 GMT+0800 (中国标准时间) A = new Date();