Class DateUtil
java.lang.Object
com.github.hypfvieh.util.DateUtil
- Since:
- v1.2.1 - 2024-09-20
- Author:
- hypfvieh
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisAfterEqual(LocalDate _first, LocalDate _second) Checks if the first date is after or equal to the second date.static booleanisAfterEqual(LocalDateTime _first, LocalDateTime _second) Checks if the first timestamp is after or equal to the second timestamp.static booleanisAfterEqual(LocalTime _first, LocalTime _second) Checks if the first time is after or equal to the second time.static booleanisBeforeEqual(LocalDate _first, LocalDate _second) Checks if the first date is before or equal to the second date.static booleanisBeforeEqual(LocalDateTime _first, LocalDateTime _second) Checks if the first timestamp is before or equal to the second timestamp.static booleanisBeforeEqual(LocalTime _first, LocalTime _second) Checks if the first time is before or equal to the second time.static booleanisDateBetween(LocalDate _start, LocalDate _end, LocalDate _test) Check if date is in range.static booleanNull-safe equal comparison of two LocalDate objects.static booleanisEqual(LocalDateTime _first, LocalDateTime _second) Null-safe equal comparison of two LocalDateTime objects.static booleanNull-safe equal comparison of two LocalTime objects.
-
Method Details
-
isBeforeEqual
-
isAfterEqual
-
isEqual
-
isBeforeEqual
Checks if the first timestamp is before or equal to the second timestamp.- Parameters:
_first- first timestamp_second- second timestamp- Returns:
- false if any null or second timestamp after first timestamp
-
isAfterEqual
Checks if the first timestamp is after or equal to the second timestamp.- Parameters:
_first- first timestamp_second- second timestamp- Returns:
- false if any null or second timestamp before first timestamp
-
isEqual
Null-safe equal comparison of two LocalDateTime objects.- Parameters:
_first- first datetime_second- second datetime- Returns:
- true if equal
-
isBeforeEqual
-
isAfterEqual
-
isEqual
-
isDateBetween
-