From 292b33d126489670925c9250f5f83dfb34d1a91c Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Fri, 5 Mar 2021 01:50:28 +0100 Subject: [PATCH] Fixed the displayed date of week (plus 6). --- src/org/april/agirstatool/core/AgirStatoolUtils.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/org/april/agirstatool/core/AgirStatoolUtils.java b/src/org/april/agirstatool/core/AgirStatoolUtils.java index 1ca9066..ecfc59e 100644 --- a/src/org/april/agirstatool/core/AgirStatoolUtils.java +++ b/src/org/april/agirstatool/core/AgirStatoolUtils.java @@ -113,7 +113,10 @@ public class AgirStatoolUtils LocalDate date = AgirStatoolUtils.normaliseWeekDate(start); while (date.isBefore(normalizedEnd) || date.isEqual(normalizedEnd)) { - String label = date.format(DateTimeFormatter.ISO_DATE); + // The normalized date is set to the first day of the week. + // The displayed date is set to the last day of the week. So + // plus 6. + String label = date.plusDays(6).format(DateTimeFormatter.ISO_DATE); result.add(label); date = date.plusWeeks(1); }