`

js一行格式化日期yyyyMMdd

    博客分类:
  • js
阅读更多
// 未设置变量一行获取明天日期格式化:yyyyMMdd
(new Date((new Date()).setDate((new Date()).getDate()+1))).getFullYear()+''+((new Date((new Date()).setDate((new Date()).getDate()+1)).getMonth()+1)<=9?('0'+(new Date((new Date()).setDate((new Date()).getDate()+1)).getMonth()+1)):(new Date((new Date()).setDate((new Date()).getDate()+1)).getMonth()+1))+''+(new Date((new Date()).setDate((new Date()).getDate()+1))).getDate();

 

http://qiaole.sinaapp.com/

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics