前端JS解决CST时间格式转成正常
data为cst时间格式format为想要转换的时间格式 例如 yyyy-MM-dd HH:mm:ssfunction dateFormat (date,format) {if(nulldate || ""date){return “”;}if(date’’||datenull){return ‘’;}date = new Date(date);date.setHours(date.getHours()-14);var o = {‘M+’ : date.getMonth() + 1
原创
2022-02-25 15:07:49 ·
727 阅读 ·
0 评论