Class DaysOfWeekDatatypeUtils

java.lang.Object
io.jmix.fullcalendarflowui.datatype.DaysOfWeekDatatypeUtils

public final class DaysOfWeekDatatypeUtils extends Object
INTERNAL.
  • Method Details

    • getOrderedByFirstDay

      public static List<DayOfWeek> getOrderedByFirstDay(DayOfWeek firstDay)
      Returns all days of week. The order starts from provided day. For instance, if the provided day is DayOfWeek.WEDNESDAY, so the order will be the following:

      WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY, MONDAY, TUESDAY

      Parameters:
      firstDay - the day from which a week should start
      Returns:
      days of week with the provided day as first
    • sortByFirstDay

      public static List<DayOfWeek> sortByFirstDay(Collection<DayOfWeek> daysOfWeek, DayOfWeek firstDay)
      Sorts provided collection in order that the provided day would have been the first day of week.
      Parameters:
      daysOfWeek - collection of days
      firstDay - the first day of week
      Returns:
      sorted collection