月日历完成
This commit is contained in:
@@ -2,7 +2,7 @@ import dayjs from 'dayjs'
|
||||
|
||||
interface Date{
|
||||
day?: number;
|
||||
list?: Array<unknown>;
|
||||
list?: Array<any>;
|
||||
}
|
||||
|
||||
interface GetDate{
|
||||
@@ -46,7 +46,8 @@ export function getdate(yue?: number): GetDate{
|
||||
i++;
|
||||
const zhou = Math.floor((i + w - 1) / 7)
|
||||
const d = {
|
||||
day: i
|
||||
day: i,
|
||||
list: []
|
||||
}
|
||||
if(date[zhou] == undefined){
|
||||
date[zhou] = []
|
||||
@@ -91,4 +92,11 @@ export function getweek(zhou?: number){
|
||||
}
|
||||
console.log(date)
|
||||
return {date, year, yue, day, zhou}
|
||||
}
|
||||
|
||||
|
||||
export function getDay(date: string){
|
||||
const now = dayjs(date)
|
||||
console.log(now.date())
|
||||
return now.date();
|
||||
}
|
||||
Reference in New Issue
Block a user