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