Enum Class WeekendPolicy

java.lang.Object
java.lang.Enum<WeekendPolicy>
io.github.projectunified.cronutils.utils.WeekendPolicy
All Implemented Interfaces:
Serializable, Comparable<WeekendPolicy>, java.lang.constant.Constable

public enum WeekendPolicy extends Enum<WeekendPolicy>
  • Enum Constant Details

    • THURSDAY_FRIDAY

      public static final WeekendPolicy THURSDAY_FRIDAY
    • FRIDAY_SATURDAY

      public static final WeekendPolicy FRIDAY_SATURDAY
    • SATURDAY_SUNDAY

      public static final WeekendPolicy SATURDAY_SUNDAY
  • Method Details

    • values

      public static WeekendPolicy[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static WeekendPolicy valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • daysToWeekend

      public static int daysToWeekend(WeekendPolicy policy, ZonedDateTime date)
    • daysFromWeekend

      public static int daysFromWeekend(WeekendPolicy policy, ZonedDateTime date)