diff --git a/backend/src/utils.ts b/backend/src/utils.ts index 9bbdee5..5c2586b 100644 --- a/backend/src/utils.ts +++ b/backend/src/utils.ts @@ -31,13 +31,7 @@ export function getMonthString(): string { export function getMonthStringFromNow(monthsAway: number): string { let today: DateTime = DateTime.now() - today = today.set({ day: 1 }) - - if (monthsAway > 0) { - today = today.plus({ month: monthsAway }) - } else { - today = today.minus({ month: monthsAway }) - } + today = today.set({ day: 1 }).plus({ month: monthsAway }) return today.toISO().split('T')[0] }