万物不为我所有,但为我所用|

注入灵魂

园龄:3年7个月粉丝:3关注:2

📂Vue
🔖Vue
2022-11-01 16:27阅读: 22评论: 0推荐: 0

常用设置时间格式

fromatTime(val){
const data = new Date(val)
const Year = date.getFullYear()
let Month = date.getMonth() + 1
Month = Month < 10? '0' + Month : Month
let Day = date.getDate()
Day = Day < 10? '0' + Day : Day
let Hour = date.getHours()
Hour = Hour < 10? '0' + Hour : Hour
let Minute = date.getMinutes()
Minute = Minute < 10? '0' + Minute : Minute
let Second = date.getSeconds()
Second = Second < 10? '0' + Second : Second
return Year + '-' + Month + '-' + Day + '' + Hour + ':' + Minute + ':' + Second
}

本文作者:注入灵魂

本文链接:https://www.cnblogs.com/totopian/p/16848186.html

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

posted @   注入灵魂  阅读(22)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示
评论
收藏
关注
推荐
深色
回顶
收起
  1. 1 尚好的青春 孙燕姿
尚好的青春 - 孙燕姿
00:00 / 00:00
An audio error has occurred.