Created
January 13, 2017 08:33
-
-
Save Alex-xd/034458400b947fff7b80ff692686755d to your computer and use it in GitHub Desktop.
处理毫秒级时间
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 处理毫秒级的时间 | |
handleTime: function (times) { | |
var t = new Date(times); | |
return t.getFullYear() + '年' + (t.getMonth() + 1) + '月' + t.getDate() + '日 ' + t.toTimeString().slice(0, 5) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment