79197102

Date: 2024-11-17 11:55:51
Score: 1.5
Natty:
Report link

I have seen that you are using LocalDateTime and LocalTime in Java, these classes have methods to know if they overlap:

boolean isAfter(ChronoLocalDateTime<?> other) ➔ Checks if this date-time is after the specified date-time.

boolean isBefore(ChronoLocalDateTime<?> other) ➔ Checks if this date-time is before the specified date-time.

boolean isEqual(ChronoLocalDateTime<?> other) ➔ Checks if this date-time is equal to the specified date-time.

You could just get the last date from your range1 and the first from your second range. And play with this

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Jesús Mariscal