Commit 35357ad4 authored by Marcel's avatar Marcel

fix #1 show events on current date

parent ca4cb74a
Pipeline #28371751 passed with stage
in 1 minute and 17 seconds
......@@ -37,7 +37,7 @@ public class CtEvent implements Comparable {
}
public boolean isPast() {
return LocalDate.now().isBefore(getStartAsDateTime().toLocalDate());
return LocalDate.now().isAfter(getStartAsDateTime().toLocalDate());
}
@Override
......
......@@ -50,7 +50,7 @@ public class CtEventService {
Collection<CtEvent> eventCollection = response.getBody().getData().values();
// Filter past events and events without an agenda
eventCollection = eventCollection.stream().filter(ctEvent -> ctEvent.isPast()).filter(ctEvent -> Boolean.TRUE.equals(ctEvent.getAgenda())).collect(Collectors.toList());
eventCollection = eventCollection.stream().filter(ctEvent -> !ctEvent.isPast()).filter(ctEvent -> Boolean.TRUE.equals(ctEvent.getAgenda())).collect(Collectors.toList());
CtEvent[] events = eventCollection.toArray(new CtEvent[0]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment