chore: minor changes

This commit is contained in:
Ephraim Atta-Duncan
2025-06-05 11:41:26 +00:00
parent 9739a0ca96
commit 2c064d5aff
12 changed files with 169 additions and 550 deletions

View File

@ -101,15 +101,15 @@ export function getDateRangeForPeriod(
}
export function isDateInPeriod(date: Date, period: TimePeriod): boolean {
const dateTime = DateTime.fromJSDate(date);
if (period === 'all-time') {
return true;
}
const dateTime = DateTime.fromJSDate(date);
const range = getDateRangeForPeriod(period);
if (!range) {
return true;
return false;
}
return dateTime >= range.start && dateTime <= range.end;