Created
February 16, 2013 06:12
-
-
Save lanqy/4965777 to your computer and use it in GitHub Desktop.
时间戳转换成类似2012-12-20 的时间格式
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
_fullDate: function(time){ //转换成类似 2012-12-20 的时间格式 | |
var date = new Date(time); | |
return date.getFullYear() + '-' + (date.getMonth() >= 9 ? '' : '0') + (date.getMonth() + 1) + '-' + (date.getDate() > 9 ? '' : '0') + date.getDate(); | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment