This commit is contained in:
Francis Cao 2024-02-29 17:40:58 -08:00
commit e5c19482ab
2 changed files with 8 additions and 1 deletions

View File

@ -2,7 +2,7 @@
"name": "umami",
"version": "2.11.0",
"description": "A simple, fast, privacy-focused alternative to Google Analytics.",
"author": "Mike Cao <mike@mikecao.com>",
"author": "Umami Software, Inc. <hello@umami.is>",
"license": "MIT",
"homepage": "https://umami.is",
"repository": {

View File

@ -263,6 +263,13 @@ export function getOffsetDateRange(dateRange: DateRange, increment: number) {
const { unit: originalUnit } = parseDateValue(value) || {};
switch (originalUnit) {
case 'day':
return {
...dateRange,
startDate: addDays(startDate, increment),
endDate: addDays(endDate, increment),
offset: offset + increment,
};
case 'week':
return {
...dateRange,