@@ -30,7 +30,7 @@ export function getMonths(year: number, month: number, day: number) {
3030 * 判断年闰年
3131 */
3232export function isLeapYear ( year : number ) {
33- return ( year % 400 === 0 || ( year % 100 !== 0 && year % 4 === 0 ) ) ;
33+ return year % 400 === 0 || ( year % 100 !== 0 && year % 4 === 0 ) ;
3434}
3535
3636/**
@@ -95,6 +95,7 @@ export interface daysArrProps {
9595 colorType : string ;
9696 lunarMonth : string ;
9797 lunar : string ;
98+ date ?: string ;
9899}
99100/**
100101 * 按每周分行
@@ -116,6 +117,7 @@ export function getWeeksArray(lastDays: number[], days: number[], nextDays: numb
116117 colorType : getHoliday . colorType ,
117118 lunarMonth : getHoliday . lunarMonth ,
118119 lunar : getHoliday . lunar ,
120+ date : year + '-' + ( month + 1 ) + '-' + lstVal ,
119121 } ) ;
120122 } ) ;
121123 days . forEach ( ( Val , Indx ) => {
@@ -130,6 +132,7 @@ export function getWeeksArray(lastDays: number[], days: number[], nextDays: numb
130132 colorType : getHoliday . colorType ,
131133 lunarMonth : getHoliday . lunarMonth ,
132134 lunar : getHoliday . lunar ,
135+ date : year + '-' + ( month + 1 ) + '-' + Val ,
133136 } ) ;
134137 } ) ;
135138 nextDays . forEach ( ( nextVal , nextIndx ) => {
@@ -143,6 +146,7 @@ export function getWeeksArray(lastDays: number[], days: number[], nextDays: numb
143146 colorType : getHoliday . colorType ,
144147 lunarMonth : getHoliday . lunarMonth ,
145148 lunar : getHoliday . lunar ,
149+ date : year + '-' + ( month + 1 ) + '-' + nextVal ,
146150 } ) ;
147151 } ) ;
148152 res = res . concat ( lastArr , currentArr , nextArr ) ;
0 commit comments