Add support for third delivery date

This commit is contained in:
2023-04-10 19:19:15 +02:00
parent 691b995500
commit 8eef7d8c0a
3 changed files with 29 additions and 3 deletions
@@ -41,6 +41,18 @@ public class TLWMatchesManagerBase {
return filteredMatches;
}
public static ArrayList<TLWMatch> getMatchesStartingFromSecondWeek(ArrayList<TLWMatch> matches) {
LocalDateTime firstMatchtime = getFirstMatchtimeTLW(matches);
ArrayList<TLWMatch> filteredMatches = new ArrayList<>();
for(TLWMatch match : matches) {
LocalDateTime matchDateTime = getDate(match);
if(getDaysDifference(matchDateTime, firstMatchtime) > 6) {
filteredMatches.add(match);
}
}
return filteredMatches;
}
public static LocalDateTime getFirstMatchtimeTLW(ArrayList<TLWMatch> matches) {
LocalDateTime matchtime = null;
for(TLWMatch match : matches) {