List of usage examples for java.time.temporal Temporal equals
public boolean equals(Object obj)
From source file:org.silverpeas.core.calendar.ical4j.ICal4JImporter.java
private Period extractPeriod(final Mutable<ZoneId> zoneId, final VEvent vEvent) { final Date startDate = vEvent.getStartDate().getDate(); Date endDate = vEvent.getEndDate().getDate(); if (endDate == null && !(startDate instanceof DateTime)) { endDate = startDate;/* www. j a v a 2 s. c om*/ } Temporal startTemporal = iCal4JDateCodec.decode(startDate, zoneId.get()); Temporal endTemporal = iCal4JDateCodec.decode(endDate, zoneId.get()); if (endTemporal instanceof OffsetDateTime && startTemporal.equals(endTemporal)) { endTemporal = endTemporal.plus(1, ChronoUnit.HOURS); } return Period.between(startTemporal, endTemporal); }