mirror of
https://github.com/umami-software/umami.git
synced 2026-02-06 13:47:15 +01:00
Rearrange date range dropdown logically
This commit is contained in:
parent
83678756c7
commit
4cc75e75d4
2 changed files with 3 additions and 13 deletions
|
|
@ -4,14 +4,12 @@ import {
|
|||
addHours,
|
||||
addDays,
|
||||
addMonths,
|
||||
subHours,
|
||||
subDays,
|
||||
startOfHour,
|
||||
startOfDay,
|
||||
startOfWeek,
|
||||
startOfMonth,
|
||||
startOfYear,
|
||||
endOfHour,
|
||||
endOfDay,
|
||||
endOfWeek,
|
||||
endOfMonth,
|
||||
|
|
@ -75,13 +73,6 @@ export function getDateRange(value) {
|
|||
unit,
|
||||
value,
|
||||
};
|
||||
case 'hour':
|
||||
return {
|
||||
startDate: subHours(startOfHour(now), num - 1),
|
||||
endDate: endOfHour(now),
|
||||
unit,
|
||||
value,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue