1
0

fix(task): remove wrong repeat types

Repeating "monthly" or "yearly" was never what people expected, only 30 or 365 days which is not always correct. This change removes these settings since the repeating modes will be re-done anyway.

Related to https://kolaente.dev/vikunja/frontend/issues/3585#issuecomment-53642
This commit is contained in:
kolaente
2023-09-06 15:41:48 +02:00
parent b187e8c1b6
commit 7746d39161
4 changed files with 3 additions and 15 deletions

View File

@ -16,10 +16,6 @@ export function secondsToPeriod(seconds: number): { unit: PeriodUnit, amount: nu
if (seconds % SECONDS_A_DAY === 0) {
if (seconds % SECONDS_A_WEEK === 0) {
return {unit: 'weeks', amount: seconds / SECONDS_A_WEEK}
} else if (seconds % SECONDS_A_MONTH === 0) {
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 {
return {unit: 'days', amount: seconds / SECONDS_A_DAY}
}