Class Utilities
- java.lang.Object
-
- fr.paris.lutece.plugins.appointment.service.Utilities
-
public final class Utilities extends Object
Class of utilities
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static LocalDategetClosestDateInPast(List<LocalDate> listDate, LocalDate dateToSearch)Return the closest date in past a list of date with the given datestatic LocalDateTimegetClosestDateTimeInFuture(List<LocalDateTime> listDateTime, LocalDateTime dateTimeToSearch)Return the closest date time in future in a list of date time and a given date timestatic WeekDefinitiongetClosestWeekDefinitionInPast(List<WeekDefinition> listWeek, LocalDate dateToSearch)Return the closest Week in past a list of date with the given datestatic DateTimeFormattergetFormatter()Getter for the formatter
-
-
-
Method Detail
-
getFormatter
public static DateTimeFormatter getFormatter()
Getter for the formatter- Returns:
- the formatter
-
getClosestDateInPast
public static LocalDate getClosestDateInPast(List<LocalDate> listDate, LocalDate dateToSearch)
Return the closest date in past a list of date with the given date- Parameters:
listDate- the list of datedateToSearch- the date to search- Returns:
- the closest date in past
-
getClosestWeekDefinitionInPast
public static WeekDefinition getClosestWeekDefinitionInPast(List<WeekDefinition> listWeek, LocalDate dateToSearch)
Return the closest Week in past a list of date with the given date- Parameters:
listDate- the list of datedateToSearch- the date to search- Returns:
- the closest week in past
-
getClosestDateTimeInFuture
public 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- Parameters:
listDateTime- the list of date timedateTimeToSearch- the date time to search- Returns:
- the closest date time in the list in the future of the given date time
-
-