js日期

常用函數:

創建一個日期對象

var ss =new Date();

獲取一周的天數:

ss.getDay();

獲取1970年1月1日到現在的毫秒數:

getTime();

設置具體的日期:

setFullYear(年,月,日)

按UTC標準轉換為字符串:

toUTCString()

獲取日期

getDate()

日期比較>、<、<=

日期加上5天getDate+5,日期減去幾天getDate-5;

原文地址:https://www.cnblogs.com/Zhengxiaoxiao/p/10477100.html