日历修改

This commit is contained in:
2020-10-16 08:59:17 +08:00
parent 7bf5fc86de
commit ad1c54fdc9
3 changed files with 26 additions and 3 deletions

View File

@@ -11,6 +11,8 @@ interface GetDate{
yue: number;
day: number;
zhou: number;
start: string;
end: string;
}
export function getdate(yue?: number): GetDate{
@@ -27,7 +29,8 @@ export function getdate(yue?: number): GetDate{
now = now.date(0);
const month = now.date(); // 当前月有几天
const year = now.year()
const start = year + "-" + yue + '-01';
const end = year + "-" + yue + '-' + month;
console.log(day,week,month)
let i = 0;
let w = 0;
@@ -55,7 +58,7 @@ export function getdate(yue?: number): GetDate{
}
console.log(date)
return {date, year, yue, day, zhou};
return {date, year, yue, day, zhou, start, end};
}