1.Date

1>创立
var d = new Date(); //返回以后执行工夫
var d2 = new Date("2/3/2021 11:10:1"); //指定工夫

2>getDate() : 返回以后对象的日
d2.getDate() //3

3>getDay() : 返回周几,0-6,周日为0
d2.getDay()

4>getMonth() : 返回月,0-11,一月为0
5>getFullYear() : 返回年份
6>getTime() : 返回以后日期工夫戳

工夫戳:从规范工夫1970.1.1 0:0:0,到以后日期所破费的毫秒数(1s =1000ms)

7>Date.now() : 获取以后工夫戳

2.Math
Math.abs()
Math.ceil() //上取整
Math.floor()
Math.round() //四舍五入
Math.random() //0-1随机数
Math.max(1,2,3)
Math.min()
Math.pow(x,y); //x的y次幂
Math.sqrt(x); //x的平方根