Added parseDateRangeQuery function.

This commit is contained in:
Mike Cao 2023-07-26 09:55:54 -07:00
parent 09af33c77e
commit 1648707fc7
9 changed files with 48 additions and 80 deletions

View file

@ -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),