mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-15 15:37:33 +08:00
code refactor, modify style
This commit is contained in:
@@ -414,3 +414,14 @@ export function isDateRangeMatchFullMonths(minTime, maxTime) {
|
||||
|
||||
return firstDayOfMonth.unix() === minDateTime.unix() && lastDayOfMonth.unix() === maxDateTime.unix();
|
||||
}
|
||||
|
||||
export function isDateRangeMatchOneMonth(minTime, maxTime) {
|
||||
const minDateTime = parseDateFromUnixTime(minTime);
|
||||
const maxDateTime = parseDateFromUnixTime(maxTime);
|
||||
|
||||
if (getYear(minDateTime) !== getYear(maxDateTime) || getMonth(minDateTime) !== getMonth(maxDateTime)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return isDateRangeMatchFullMonths(minTime, maxTime);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user