public final class Utilities extends Object
Modifier and Type | Field and Description |
---|---|
static String |
FORMAT_DATE |
Modifier and Type | Method and Description |
---|---|
static LocalDate |
getClosestDateInPast(List<LocalDate> listDate,
LocalDate dateToSearch)
Return the closest date in past a list of date with the given date
|
static LocalDateTime |
getClosestDateTimeInFuture(List<LocalDateTime> listDateTime,
LocalDateTime dateTimeToSearch)
Return the closest date time in future in a list of date time and a given date time
|
static DateTimeFormatter |
getFormatter()
Getter for the formatter
|
static void |
setFormatter(DateTimeFormatter formatter)
Setter for the formatter
|
public static final String FORMAT_DATE
public static DateTimeFormatter getFormatter()
public static void setFormatter(DateTimeFormatter formatter)
formatter
- the formatter to setpublic static LocalDate getClosestDateInPast(List<LocalDate> listDate, LocalDate dateToSearch)
listDate
- the list of datedateToSearch
- the date to searchpublic static LocalDateTime getClosestDateTimeInFuture(List<LocalDateTime> listDateTime, LocalDateTime dateTimeToSearch)
listDateTime
- the list of date timedateTimeToSearch
- the date time to searchCopyright © 2020 City of Paris. All rights reserved.