Enum Class Weekday

java.lang.Object
java.lang.Enum<Weekday>
ch.ivyteam.util.date.Weekday
All Implemented Interfaces:
Serializable, Comparable<Weekday>, java.lang.constant.Constable

public enum Weekday extends Enum<Weekday>
Days of the week
API:
This is a public API.
  • Enum Constant Details

    • SUNDAY

      public static final Weekday SUNDAY
      Sunday
      API:
      This public API is available in Java.
    • MONDAY

      public static final Weekday MONDAY
      Monday
      API:
      This public API is available in Java.
    • TUESDAY

      public static final Weekday TUESDAY
      Tuesday
      API:
      This public API is available in Java.
    • WEDNESDAY

      public static final Weekday WEDNESDAY
      Wednesday
      API:
      This public API is available in Java.
    • THURSDAY

      public static final Weekday THURSDAY
      Thursday
      API:
      This public API is available in Java.
    • FRIDAY

      public static final Weekday FRIDAY
      Friday
      API:
      This public API is available in Java.
    • SATURDAY

      public static final Weekday SATURDAY
      Saturday
      API:
      This public API is available in Java.
  • Method Details

    • getName

      public String getName()
      Returns:
      the English name of this weekday. E.g. Monday
      API:
      This public API is available in Java.
    • getShortName

      public String getShortName()
      Returns:
      the English short name of this weekday. E.g. Mo for Monday
      API:
      This public API is available in Java.
    • getLocalizedName

      public String getLocalizedName(Locale locale)
      Parameters:
      locale - the locale used to localize the name, if null Locale.getDefault() is used.
      Returns:
      the localized name of the weekday
      API:
      This public API is available in Java.
    • getShortLocalizedName

      public String getShortLocalizedName(Locale locale)
      Parameters:
      locale - the locale used to localize the name, if null Locale.getDefault() is used.
      Returns:
      the short localized name of the weekday
      API:
      This public API is available in Java.
    • getCalendarValue

      public int getCalendarValue()
      Returns:
      value of the Calendar constants for the current weekday.
      API:
      This public API is available in Java.
    • getWeekday

      public static Weekday getWeekday(Date date)
      Get weekday of the given date
      Parameters:
      date - the java date
      Returns:
      the weekday of the given date
      API:
      This public API is available in Java.
    • getWeekday

      public static Weekday getWeekday(Calendar calendar)
      Gets weekday of the given calendar
      Parameters:
      calendar - the java calendar
      Returns:
      the weekday of the given calendar
      API:
      This public API is available in Java.
    • getCurrentWeekday

      public static Weekday getCurrentWeekday()
      Gets the weekday of the current day
      Returns:
      the current weekday. Never null.
      API:
      This public API is available in Java.
    • getWeekday

      public static Weekday getWeekday(int calendarWeekdayValue)
      Parameters:
      calendarWeekdayValue - the int constants used for weekdays in the Calendar
      Returns:
      the weekday of the given weekdayCalendarValue
      API:
      This public API is available in Java.