Fixed week format alignement.
This commit is contained in:
parent
ebc17b6815
commit
d13d4a7b9a
@ -89,14 +89,14 @@ public class AgirStatoolUtils
|
|||||||
|
|
||||||
LocalDate normalizedEnd = normaliseWeekDate(end);
|
LocalDate normalizedEnd = normaliseWeekDate(end);
|
||||||
LocalDate date = normaliseWeekDate(start);
|
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)
|
if (index == -1)
|
||||||
{
|
{
|
||||||
index = 0;
|
index = 0;
|
||||||
}
|
}
|
||||||
while (date.isBefore(normalizedEnd) || date.isEqual(normalizedEnd))
|
while (date.isBefore(normalizedEnd) || date.isEqual(normalizedEnd))
|
||||||
{
|
{
|
||||||
String dateToken = date.format(DateTimeFormatter.ofPattern("yyyyw"));
|
String dateToken = date.format(DateTimeFormatter.ofPattern("yyyyww"));
|
||||||
long count;
|
long count;
|
||||||
if (index < source.size())
|
if (index < source.size())
|
||||||
{
|
{
|
||||||
@ -145,7 +145,7 @@ public class AgirStatoolUtils
|
|||||||
long count = 0;
|
long count = 0;
|
||||||
while (date.isBefore(end) || date.isEqual(end))
|
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);
|
DateCount current = source.get(dateToken);
|
||||||
if (current != null)
|
if (current != null)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user