mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 06:07:17 +01:00
Added parseDateRangeQuery function.
This commit is contained in:
parent
09af33c77e
commit
1648707fc7
9 changed files with 48 additions and 80 deletions
|
|
@ -62,10 +62,10 @@ export function parseDateRange(value, locale = 'en-US') {
|
|||
}
|
||||
|
||||
if (value?.startsWith?.('range')) {
|
||||
const [, startAt, endAt] = value.split(':');
|
||||
const [, startTime, endTime] = value.split(':');
|
||||
|
||||
const startDate = new Date(+startAt);
|
||||
const endDate = new Date(+endAt);
|
||||
const startDate = new Date(+startTime);
|
||||
const endDate = new Date(+endTime);
|
||||
|
||||
return {
|
||||
...getDateRangeValues(startDate, endDate),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue