首页 > 其他 > 详细

时间对象常用

时间:2015-04-24 16:06:42      阅读:196      评论:0      收藏:0      [点我收藏+]
 1      月份取值:January、February、March、April、May、June、July、August、September、October、November、December
 2      时间转换公式: 
 3      天:Math.floor(t/86400)
 4      时:Math.floor(t%86400/3600)
 5      分:Math.floor(t%86400%3600/60)
 6      秒:t%60
 7      获取时间对象:new Date()
 8      getFullYear
 9      getMonth
10      getDate
11      getDay
12      getHours
13      getMinutes
14      getSeconds
15      时间戳:new Date().getTime()-返回从1970年1月1日到现在的毫秒数(UTC时间标准时间)

 

时间对象常用

原文:http://www.cnblogs.com/wanqiu/p/4453589.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!