时间格式处理

获取中国标准时间    new Date()   

Fri Oct 11 2019 15:09:32 GMT+0800 (中国标准时间)

中国标准时间转换成(年月日时分秒)new Date().toLocaleString()

"2019/10/11 下午3:11:02"

中国标准时间转换成(年月日)new Date().toLocaleDateString()

"2019/10/11"

中国标准时间转换成(毫秒)new Date().getTime()

1570778033279

毫秒转换成中国标准时间  new Date(1570778033279)

Fri Oct 11 2019 15:13:53 GMT+0800 (中国标准时间)

posted @ 2020-01-07 17:19  崔嵬  阅读(194)  评论(0编辑  收藏  举报