Class Utilities
java.lang.Object
fr.paris.lutece.plugins.appointment.service.Utilities
Class of utilities
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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 DateTimeFormatterGetter for the formatter
-
Method Details
-
getFormatter
Getter for the formatter- Returns:
- the formatter
-
getClosestDateInPast
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
-