方法时间
wujiezhiwei
这个作者很懒,什么都没留下…
展开
-
【公共方法1】获取当前时间为YYYY-MM-DD HH:mm:ss
//获取当前时间,格式YYYY-MM-DD HH:mm:ss getNowFormatTime() { var nowDate = new Date() var colon = ':' var h = nowDate.getHours() var m = nowDate.getMinutes() var s = nowDate.getSeconds() //补全0,并拼接 return ( this.原创 2022-03-30 10:33:54 · 1144 阅读 · 0 评论 -
【公共方法1】时间
1 格式化时间戳为日期格式 /* 格式化时间戳为日期格式 * */ date(date) { date = new Date(date); if (date === "") { return date; } else { let year = date.getFullYear(); let month = date.getMonth(); month = month <原创 2022-03-28 17:07:55 · 36 阅读 · 0 评论