Fix backup cleaner

This commit is contained in:
Marc Baloup 2022-12-14 19:28:37 +01:00
parent d11631a942
commit 148099a4d2
Signed by: marcbal
GPG Key ID: BBC0FE3ABC30B893

View File

@ -33,7 +33,7 @@ public abstract class BackupCleaner implements UnaryOperator<TreeSet<LocalDateTi
return localDateTimes.stream() return localDateTimes.stream()
.collect(Collectors.groupingBy( .collect(Collectors.groupingBy(
ldt -> { ldt -> {
return ldt.getYear() * 4 + ldt.getMonthValue() / 2; return ldt.getYear() * 4 + ldt.getMonthValue() / n;
}, },
TreeMap::new, TreeMap::new,
Collectors.minBy(LocalDateTime::compareTo)) Collectors.minBy(LocalDateTime::compareTo))