Skip to content

Commit

Permalink
fix(next/web): last month range
Browse files Browse the repository at this point in the history
  • Loading branch information
sdjdd committed Sep 1, 2023
1 parent 8547417 commit 2f22b34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions next/web/src/utils/date-range.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export const relativeDateGetters: Record<string, () => DateRange> = {
to: moment().endOf('month').toDate(),
}),
lastMonth: () => ({
from: moment().startOf('month').subtract(1, 'month').toDate(),
to: moment().endOf('month').subtract(1, 'month').toDate(),
from: moment().subtract(1, 'month').startOf('month').toDate(),
to: moment().subtract(1, 'month').endOf('month').toDate(),
}),
lastSevenDays: () => ({
from: moment().subtract(6, 'day').startOf('day').toDate(),
Expand Down

0 comments on commit 2f22b34

Please sign in to comment.