时间与时间戳相互转 分手后的思念是犯贱 2022-10-23 02:59 186阅读 0赞 ## 时间戳转时间 ## let nowtime = new Date(); var year = nowtime.getFullYear(); var month = nowtime.getMonth()+1; var day = nowtime.getDate(); var h =nowtime.getHours(); var m = nowtime.getMinutes(); var s = nowtime.getSeconds(); ## 时间转时间戳 ## new Date(year+'/'+month+'/'+day+' '+ h+':'+m+':'+s).getTime();
还没有评论,来说两句吧...