diff --git a/src/components/tasks/partials/reminder-detail.vue b/src/components/tasks/partials/reminder-detail.vue index bb3ed49e5..17f857e03 100644 --- a/src/components/tasks/partials/reminder-detail.vue +++ b/src/components/tasks/partials/reminder-detail.vue @@ -226,8 +226,6 @@ function translateUnit(amount: number, unit: PeriodUnit): string { return t('time.units.days', amount) case 'weeks': return t('time.units.weeks', amount) - case 'months': - return t('time.units.months', amount) case 'years': return t('time.units.years', amount) } diff --git a/src/helpers/time/period.ts b/src/helpers/time/period.ts index cea6ac74a..bf2dcf4d4 100644 --- a/src/helpers/time/period.ts +++ b/src/helpers/time/period.ts @@ -17,7 +17,7 @@ export function secondsToPeriod(seconds: number): { unit: PeriodUnit, amount: nu if (seconds % SECONDS_A_WEEK === 0) { return {unit: 'weeks', amount: seconds / SECONDS_A_WEEK} } else if (seconds % SECONDS_A_MONTH === 0) { - return {unit: 'months', amount: seconds / SECONDS_A_MONTH} + return {unit: 'days', amount: seconds / SECONDS_A_MONTH * 30} } else if (seconds % SECONDS_A_YEAR === 0) { return {unit: 'years', amount: seconds / SECONDS_A_YEAR} } else {