码迷,mamicode.com
首页 > 其他好文 > 详细

单个获取年、月、日、时、分

时间:2017-12-15 15:08:34      阅读:88      评论:0      收藏:0      [点我收藏+]

标签:day   pre   body   asc   date   class   blog   获取   pos   

var year = new Date().getFullYear() ;//获取当前年份
var month = new Date().getMonth()+1;//获取当前月份
var day = new Date().getDate();//获取当前日
var hours = new Date().getHours(); //获取小时
var minutes = new Date().getMinutes(); //获取分钟

  

单个获取年、月、日、时、分

标签:day   pre   body   asc   date   class   blog   获取   pos   

原文地址:http://www.cnblogs.com/rockyan/p/8042761.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!