首页 > 代码库 > js 日期

js 日期

let date = new Date();
let year = date.getFullYear();
let money = money = date.getMonth() + 1;
let day = day = date.getDate();
let week = date.getDay();

 

conversion (num) {
num = num - 1;
if(num < 0) return "一";
var china = new Array(‘一‘,‘二‘,‘三‘,‘四‘,‘五‘,‘六‘,‘日‘);
return china[num];
}

js 日期