mirror of
https://github.com/documenso/documenso.git
synced 2025-11-16 17:51:49 +10:00
chore: minor changes
This commit is contained in:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user