java.lang.Object
com.github.hypfvieh.util.DateUtil
- Seit:
- v1.2.1 - 2024-09-20
- Autor:
- hypfvieh
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic 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.
-
Methodendetails
-
isBeforeEqual
Checks if the first date is before or equal to the second date.- Parameter:
_first- first date_second- second date- Gibt zurück:
- false if any null or second date after first date
-
isAfterEqual
Checks if the first date is after or equal to the second date.- Parameter:
_first- first date_second- second date- Gibt zurück:
- false if any null or second date before first date
-
isEqual
Null-safe equal comparison of two LocalDate objects.- Parameter:
_first- first date_second- second date- Gibt zurück:
- true if equal
-
isBeforeEqual
Checks if the first timestamp is before or equal to the second timestamp.- Parameter:
_first- first timestamp_second- second timestamp- Gibt zurück:
- false if any null or second timestamp after first timestamp
-
isAfterEqual
Checks if the first timestamp is after or equal to the second timestamp.- Parameter:
_first- first timestamp_second- second timestamp- Gibt zurück:
- false if any null or second timestamp before first timestamp
-
isEqual
Null-safe equal comparison of two LocalDateTime objects.- Parameter:
_first- first datetime_second- second datetime- Gibt zurück:
- true if equal
-
isBeforeEqual
Checks if the first time is before or equal to the second time.- Parameter:
_first- first time_second- second time- Gibt zurück:
- false if any null or second time after first time
-
isAfterEqual
Checks if the first time is after or equal to the second time.- Parameter:
_first- first time_second- second time- Gibt zurück:
- false if any null or second time before first time
-
isEqual
Null-safe equal comparison of two LocalTime objects.- Parameter:
_first- first time_second- second time- Gibt zurück:
- true if equal
-
isDateBetween
Check if date is in range.- Parameter:
_start- range start date_end- range end date_test- date to check- Gibt zurück:
- true if in range
-