js处理时间戳为各种格式/js判断公历/农历/周历节日和节气
js获取时间
var date = new Date();
date.getYear();//获取当前年份距离1900年的年份
date.getFUllYear();//获取当前年份
//date.getYear()+1900=date.getFullyear()
date.getMonth();//获取月份,0~11,0代表1月
date.getDate();//获取当前日,1~31
date.getDay();//获取当前星期几,0~6,0代表星期日
date .getTime(); //获取当前时间,
原创
2020-10-14 14:55:08 ·
4202 阅读 ·
5 评论