首页 > 其他 > 详细

date

时间:2020-07-11 23:47:18      阅读:84      评论:0      收藏:0      [点我收藏+]

var  date  =  new  Date( );

(1)Date( )

  返回当日的日期和时间

(2)getDate( )

  返回一月中的某一天(1-31)

(3)getMonth( )

  返回一年中的某个月(0~11)

(4)getFullYear( )

  返回四位数字的年份

(5)getHours( )

  返回小时(0~23)

(6)getMinutes( )

  返回分钟(0~59)

(7)getSeconds( )

  返回秒数(0~59)

(8)getMilliseconds( )

  返回毫秒数(0~999)

(9)getTime( )

  返回1970年1月1日至今的毫秒数,时间戳

(10)setDate( )

  设置一月中的某一天(1-31)

(11)setMonth( )

  设置一年中的某个月(0~11)

(12)setFullYear( )

  设置四位数字的年份

(13)setHours( )

  设置小时(0~23)

(14)setMinutes( )

  设置分钟(0~59)

(15)setSeconds( )

  设置秒数(0~59)

(16)setMilliseconds( )

  设置毫秒数(0~999)

(17)setTime( )

  设置1970年1月1日至今的毫秒数,时间戳

date

原文:https://www.cnblogs.com/cuishuangshuang/p/13285952.html

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