mirror of
https://github.com/umami-software/umami.git
synced 2026-02-06 13:47:15 +01:00
add timezone to revenue chartData. Fix min/max date for 7day value
This commit is contained in:
parent
bf99068bd7
commit
89d3cd4f5a
4 changed files with 21 additions and 15 deletions
|
|
@ -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':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue