diff --git a/ts/src/stats/intervals.ts b/ts/src/stats/intervals.ts index 9c8d54ba7..54d65191c 100644 --- a/ts/src/stats/intervals.ts +++ b/ts/src/stats/intervals.ts @@ -49,7 +49,7 @@ export function intervalLabel( // range return i18n.tr(i18n.TR.STATISTICS_INTERVALS_DAY_RANGE, { daysStart, - daysEnd, + daysEnd: daysEnd - 1, cards, }); } diff --git a/ts/src/time.ts b/ts/src/time.ts index 21f4f9e9c..6b1f709d4 100644 --- a/ts/src/time.ts +++ b/ts/src/time.ts @@ -146,11 +146,14 @@ export function dayLabel(i18n: I18n, daysStart: number, daysEnd: number): string } else { // range if (daysStart >= 0) { - return i18n.tr(i18n.TR.STATISTICS_IN_DAYS_RANGE, { daysStart, daysEnd }); + return i18n.tr(i18n.TR.STATISTICS_IN_DAYS_RANGE, { + daysStart, + daysEnd: daysEnd - 1, + }); } else { return i18n.tr(i18n.TR.STATISTICS_DAYS_AGO_RANGE, { daysStart: Math.abs(daysEnd), - daysEnd: -daysStart, + daysEnd: -daysStart - 1, }); } }