From adc3f2113d6c714d134833df98130b494bf960d8 Mon Sep 17 00:00:00 2001 From: fcamblor Date: Thu, 11 May 2023 01:23:53 +0200 Subject: [PATCH] fixed information displayed in day-selector buttons (there was a mix between year/month/day) --- mobile/src/models/DatesAndTime.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mobile/src/models/DatesAndTime.ts b/mobile/src/models/DatesAndTime.ts index 9ec47c25..c9648a4a 100644 --- a/mobile/src/models/DatesAndTime.ts +++ b/mobile/src/models/DatesAndTime.ts @@ -34,8 +34,8 @@ export function localDateToReadableParts(localDate: ISOLocalDate|Temporal.ZonedD day: match(dateParts.find(p => p.type === 'day')) .with(undefined, undef => undef) .otherwise(part => parseInt(part.value)), - month: dateParts.find(p => p.type === 'year')?.value, - year: match(dateParts.find(p => p.type === 'day')) + month: dateParts.find(p => p.type === 'month')?.value, + year: match(dateParts.find(p => p.type === 'year')) .with(undefined, undef => undef) .otherwise(part => parseInt(part.value)), weekday: dateParts.find(p => p.type === 'weekday')?.value,