获取当前时间,年月日时分秒

// 获取当前时间
getNowTime() {
const yy = new Date().getFullYear()
const MM = (new Date().getMonth() + 1) < 10 ? '0' + (new Date().getMonth() + 1) : (new Date().getMonth() + 1) const dd = new Date().getDate() < 10 ? '0' + new Date().getDate() : new Date().getDate() const HH = new Date().getHours() < 10 ? '0' + new Date().getHours() : new Date().getHours() const mm = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes() : new Date().getMinut

获取当前时间,年月日时分秒最先出现在Python成神之路

版权声明:
作者:感冒的梵高
链接:https://www.techfm.club/p/27417.html
来源:TechFM
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>