From 07f3841ee63766a5588a3ba797aa703cf6eae4c5 Mon Sep 17 00:00:00 2001 From: Marc Baloup Date: Wed, 14 Feb 2024 20:18:01 +0100 Subject: [PATCH] Fi TimeUtil.fullDateFr() compact date format --- .../src/main/java/fr/pandacube/lib/util/TimeUtil.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pandalib-util/src/main/java/fr/pandacube/lib/util/TimeUtil.java b/pandalib-util/src/main/java/fr/pandacube/lib/util/TimeUtil.java index 4a41dac..48401f4 100644 --- a/pandalib-util/src/main/java/fr/pandacube/lib/util/TimeUtil.java +++ b/pandalib-util/src/main/java/fr/pandacube/lib/util/TimeUtil.java @@ -257,16 +257,16 @@ public class TimeUtil { LocalDateTime displayDateTime = toLocalDateTime(timestamp); String date = showWeekday ? ((compactWords ? cmpDayOfWeekFormatter : dayOfWeekFormatter).format(displayDateTime) + " ") : ""; if (compactDate) { + date += compactDateFormatter.format(displayDateTime); + } + else { date += dayOfMonthFormatter.format(displayDateTime) + " " + (compactWords ? cmpMonthFormatter : monthFormatter).format(displayDateTime) + " " + yearFormatter.format(displayDateTime); } - else { - date += compactDateFormatter.format(displayDateTime); - } if (precision == DisplayPrecision.DAYS) return date; - return date + " à " + dayTimeFr(timestamp, precision); + return date + (compactDate ? " " : " à ") + dayTimeFr(timestamp, precision); } /**