vue 获取当前时间 年月日 时分秒
2020-03-05 08:36
2206 查看
mounted: function() {
var _this = this;
let yy = new Date().getFullYear();
let mm = new Date().getMonth()+1;
let dd = new Date().getDate();
let hh = new Date().getHours();
let mf = new Date().getMinutes()<10 ? ‘0’+new Date().getMinutes() : new Date().getMinutes();
let ss = new Date().getSeconds()<10 ? ‘0’+new Date().getSeconds() : new Date().getSeconds();
_this.gettime = yy+’-’+mm+’-’+dd+’ ‘+hh+’:’+mf;
},
- 点赞
- 收藏
- 分享
- 文章举报
![](https://oscdn.geek-share.com/Uploads/Images/Content/202001/24/e1089cbef1b3fe9d76f1d8e0af658b17.png)
相关文章推荐
- [SoapUI] 获取当前时间包括年月日时分秒来作为命名
- Flex 获取当前时间和获取当前时间减去一天的时间并且格式化为年月日时分秒的形式
- javascript中获取当前时间戳和具体年月日时分秒
- javascript获取当前时间年月日时分秒
- 获取当前时间年月日时分秒
- 获取当前时间,年月日时分秒
- ios开发 获取系统时间 取得当前的年月日,当前的时分秒获得,周几和星期几获得
- java 获取当前时间及年月日时分秒
- android获取系统当前年月日时分秒的时间
- Java获取当前时间的年月日时分秒方法
- 获取当前时间的时分秒拼接在long型的年月日后边
- 获取当前时间,年月日时分秒
- 获取系统当前时间,年月日时分秒
- 获取当前时间的 年月日时分秒
- 获取当前时间的标准时间,转换为年月日,时分秒的格式
- Android 获取当前的时间。年月日,时分秒
- c++获取当前系统时间(年月日、时分秒格式)通俗易懂
- FLex 获取当前时间 年月日 时分秒
- Android 获取当前的时间。年月日,时分秒
- js获取当前时间的年月日时分秒