一月 Jan. January
二月 Feb. February
三月 Mar. March
四月 Apr. April
五月 May. May
六月 Jun. June
七月 Jul. July
八月 Aug. August
九月 Sept. September
十月 Oct. October
十一月 Nov. November
十二月 Dec. December
Date对象 ---- 时间
四种初始化日期格式
new Date();
new Date(value);
new Date(dateString);
new Date(year, monthIndex [, day [, hours [, minutes [, seconds [, milliseconds]]]]]);
创建一个日期对象
var today = new Date()
var d1 = new Date("October 13, 1975 11:13:00")
var d2 = new Date(79,5,24)
var d3 = new Date(79,5,24,11,33,0)
console.log(today,d1,d2,d3)
getDate 获取当前日期对象是几日
var today = new Date()
console.log(today.getDate())
getDay 获取当前日期对象是星期几
var today = new Date()
console.log(today.getDay())
getMonth 获取当前日期对象是几月
var today = new Date()
console.log(today.getMonth())
getFullYear 获取当前日期对象的年份
var today = new Date()
console.log(today.getFullYear())
getTime 获取当前时间戳
var today = new Date()
console.log(today.getTime())