Hello,
I have a stream of XmlGregorianCalendar dates and I want to see if it is possible to check if the newest date is bigger that todays day
LocalDate findnewestDateFronList(List<XmlGregorianCalendar> xmldates) {
return Optional.ofNullable(xmldates)
.orElseGet(Collections::emptyList)
.stream()
.max(XMLGregorianCalendar::compare)
.map(this::parseToLocalDate)
.orElse(null)
}
is it possible to check if the date is bigger than todays date in the above code or should i do it in the parseToLocalDate() method. I whould like to throw an exception if the date is bigger than todays date.
cheers,
es
P.S first time using discord and I closed the post the previous time