Commit 71408457 by liang ce

津贴时间

parent 234d512f
......@@ -3,7 +3,7 @@ const mwUtils = {
let timeData = new Date(parseInt(time))
let year = timeData.getFullYear()
let month = (timeData.getMonth() + 1) >= 10 ? timeData.getMonth() + 1 : `0${timeData.getMonth() + 1}`
let date = timeData.getDate().length >= 10 ? timeData.getDate() : `0${timeData.getDate()}`
let date = timeData.getDate() >= 10 ? timeData.getDate() : `0${timeData.getDate()}`
let hour = timeData.getHours() >= 10 ? timeData.getHours() : `0${timeData.getHours()}`
let minute = timeData.getMinutes().toString().length > 1 ? timeData.getMinutes() : `0${timeData.getMinutes()}`
return `${year}${month}${date}${hour}:${minute}`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment