date对象

new Date();用来获取时间。对象

getFullyear:获取整年。

getMonths:用来获取月份

getTime:用来获取毫秒数。

getDay:用来获取星期几。

getHours:用来小时;

getSeconds()用来获取秒;

getMinutes();用来获取分钟。

getMilliseconds();用来获取毫秒。

以上get类方法都有set方法用来修改获取值。

原文地址:https://www.cnblogs.com/l8l8/p/8718407.html