#时间(Date)转时间戳(Timestamp):(获取时间戳)
1、var timestamp1 = (new Date()).valueOf();
2、var timestamp2 = new Date().getTime();
3、var timetamp3 = Number(new Date()) ;
#日期格式化:(时间转换为‘yyyy-MM-dd hh:mm:ss’)
var time = new Date().format('yyyy-MM-dd hh:mm:ss')
1、new Date("month dd,yyyy hh:mm:ss");
2、new Date("month dd,yyyy");
3、new Date(yyyy,mth,dd,hh,mm,ss); 注意:这种方式下,必须传递整型;
4、new Date(yyyy,mth,dd);
#时间戳(Timestamp)转时间(Date)
var date1 = new Date(1472048779952);