From 349a378f46286bd51225efa6886cb3f05f3a0bc8 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Sat, 8 May 2021 22:42:27 +0200 Subject: [PATCH] Fixed age week alignment. --- .../april/agirstatool/core/AgirStatoolUtils.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/org/april/agirstatool/core/AgirStatoolUtils.java b/src/org/april/agirstatool/core/AgirStatoolUtils.java index fbf41f0..d1294e5 100644 --- a/src/org/april/agirstatool/core/AgirStatoolUtils.java +++ b/src/org/april/agirstatool/core/AgirStatoolUtils.java @@ -145,8 +145,8 @@ public class AgirStatoolUtils if (start != null) { - LocalDate date = AgirStatoolUtils.normaliseWeekDate(start); - LocalDate normalizedEnd = AgirStatoolUtils.normaliseWeekDate(end); + LocalDate date = normaliseWeekDate(start).plusDays(6); + LocalDate normalizedEnd = normaliseWeekDate(end).plusDays(6); while (date.isBefore(normalizedEnd) || date.isEqual(normalizedEnd)) { Stat stat = project.issues().extractActivedAt(date).computeStat(date); @@ -181,8 +181,8 @@ public class AgirStatoolUtils if (start != null) { - LocalDate date = AgirStatoolUtils.normaliseWeekDate(start); - LocalDate normalizedEnd = AgirStatoolUtils.normaliseWeekDate(end); + LocalDate date = normaliseWeekDate(start).plusDays(6); + LocalDate normalizedEnd = normaliseWeekDate(end).plusDays(6); while (date.isBefore(normalizedEnd) || date.isEqual(normalizedEnd)) { Stat stat = project.issues().extractActivedAt(date).computeStat(date); @@ -217,8 +217,8 @@ public class AgirStatoolUtils if (start != null) { - LocalDate date = AgirStatoolUtils.normaliseWeekDate(start); - LocalDate normalizedEnd = AgirStatoolUtils.normaliseWeekDate(end); + LocalDate date = normaliseWeekDate(start).plusDays(6); + LocalDate normalizedEnd = normaliseWeekDate(end).plusDays(6); while (date.isBefore(normalizedEnd) || date.isEqual(normalizedEnd)) { double stat = project.issues().extractActivedAt(date).computeMedian(date); @@ -253,8 +253,8 @@ public class AgirStatoolUtils if (start != null) { - LocalDate date = AgirStatoolUtils.normaliseWeekDate(start); - LocalDate normalizedEnd = AgirStatoolUtils.normaliseWeekDate(end); + LocalDate date = normaliseWeekDate(start).plusDays(6); + LocalDate normalizedEnd = normaliseWeekDate(end).plusDays(6); while (date.isBefore(normalizedEnd) || date.isEqual(normalizedEnd)) { Stat stat = project.issues().extractActivedAt(date).computeStat(date);