add timezone to revenue chartData. Fix min/max date for 7day value

This commit is contained in:
Francis Cao 2025-09-30 13:11:11 -07:00
parent bf99068bd7
commit 89d3cd4f5a
4 changed files with 21 additions and 15 deletions

View file

@ -157,7 +157,12 @@ export function parseDateRange(value: string, locale = 'en-US'): DateRange {
const now = new Date();
const dateLocale = getDateLocale(locale);
const { num = 1, unit } = parseDateValue(value);
const { unit } = parseDateValue(value);
let { num = 1 } = parseDateValue(value);
if (value === '7day') {
num--;
}
switch (unit) {
case 'hour':