public class DateTimeUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static int |
getAge(LocalDate birthday)
Calculate the age at the current time.
|
static int |
getAge(LocalDate birthday,
LocalDate currentDate)
Calculate the age at the given date
|
static boolean |
isBetween(LocalDateTime givenDate,
LocalDateTime startDate,
LocalDateTime endDate)
Checks the given date is between the two provided dates
|
static boolean |
isLastDayOfTheMonth(LocalDate localDate)
Returns whether the given date is the last day of the month
|
static boolean |
isWeekend(LocalDate dt)
Returns whether the given date falls in a weekend
|
public static int getAge(LocalDate birthday, LocalDate currentDate)
birthday - the birthdaycurrentDate - the current datepublic static int getAge(LocalDate birthday)
birthday - the birthdaypublic static boolean isBetween(LocalDateTime givenDate, LocalDateTime startDate, LocalDateTime endDate)
givenDate - the given datestartDate - the start dateendDate - the end datepublic static boolean isLastDayOfTheMonth(LocalDate localDate)
localDate - the local datepublic static boolean isWeekend(LocalDate dt)
dt - the dtCopyright © 2019. All rights reserved.