From d13d4a7b9a83afebc5ddb7f6109e8f5732503370 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Thu, 23 Jan 2020 17:20:27 +0100 Subject: [PATCH] Fixed week format alignement. --- src/org/april/agirstatool/core/AgirStatoolUtils.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/org/april/agirstatool/core/AgirStatoolUtils.java b/src/org/april/agirstatool/core/AgirStatoolUtils.java index d8d0ad0..3cd4598 100644 --- a/src/org/april/agirstatool/core/AgirStatoolUtils.java +++ b/src/org/april/agirstatool/core/AgirStatoolUtils.java @@ -89,14 +89,14 @@ public class AgirStatoolUtils LocalDate normalizedEnd = normaliseWeekDate(end); LocalDate date = normaliseWeekDate(start); - int index = source.indexOf(start.format(DateTimeFormatter.ofPattern("yyyyw"))); + int index = source.indexOf(start.format(DateTimeFormatter.ofPattern("yyyyww"))); if (index == -1) { index = 0; } while (date.isBefore(normalizedEnd) || date.isEqual(normalizedEnd)) { - String dateToken = date.format(DateTimeFormatter.ofPattern("yyyyw")); + String dateToken = date.format(DateTimeFormatter.ofPattern("yyyyww")); long count; if (index < source.size()) { @@ -145,7 +145,7 @@ public class AgirStatoolUtils long count = 0; while (date.isBefore(end) || date.isEqual(end)) { - String dateToken = date.format(DateTimeFormatter.ofPattern("yyyyw")); + String dateToken = date.format(DateTimeFormatter.ofPattern("yyyyww")); DateCount current = source.get(dateToken); if (current != null) {