一证膨、創(chuàng)建日期對(duì)象
Paste_Image.png
二订歪、時(shí)間轉(zhuǎn)換
Paste_Image.png
- toString()方法
2.toLocalString() 方法
3.valueOf()方法
4.測(cè)試一段代碼的執(zhí)行時(shí)間
Paste_Image.png
三眼虱、獲取修改時(shí)間
Paste_Image.png
1.getFullYear() 獲取年份
2.setFullYear() 修改年份
Paste_Image.png
3.getMoth() 獲取月份
4.setMoth() 修改月份
Paste_Image.png
5.getDate() 獲取日期
6.setDate() 修改日期
Paste_Image.png
7.getDay() 獲取星期
Paste_Image.png
8.getHours() 獲取小時(shí)
9.setHours() 設(shè)置小時(shí)
Paste_Image.png
10.getMinutes() 獲取分鐘
11.setMinutes() 設(shè)置分鐘
Paste_Image.png
12.getSeconds() 獲取秒數(shù)
13.setSeconds() 設(shè)置秒數(shù)
Paste_Image.png