Package ch.ivyteam.util.date
Enum Class Weekday
- All Implemented Interfaces:
Serializable
,Comparable<Weekday>
,java.lang.constant.Constable
Days of the week
- API:
- This is a public API.
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
static Weekday
Gets the weekday of the current daygetLocalizedName
(Locale locale) getName()
getShortLocalizedName
(Locale locale) static Weekday
getWeekday
(int calendarWeekdayValue) static Weekday
getWeekday
(Calendar calendar) Gets weekday of the given calendarstatic Weekday
getWeekday
(Date date) Get weekday of the given date
-
Enum Constant Details
-
SUNDAY
Sunday- API:
- This public API is available in Java.
-
MONDAY
Monday- API:
- This public API is available in Java.
-
TUESDAY
Tuesday- API:
- This public API is available in Java.
-
WEDNESDAY
Wednesday- API:
- This public API is available in Java.
-
THURSDAY
Thursday- API:
- This public API is available in Java.
-
FRIDAY
Friday- API:
- This public API is available in Java.
-
SATURDAY
Saturday- API:
- This public API is available in Java.
-
-
Method Details
-
getName
- Returns:
- the English name of this weekday. E.g. Monday
- API:
- This public API is available in Java.
-
getShortName
- Returns:
- the English short name of this weekday. E.g. Mo for Monday
- API:
- This public API is available in Java.
-
getLocalizedName
- Parameters:
locale
- the locale used to localize the name, ifnull
Locale.getDefault()
is used.- Returns:
- the localized name of the weekday
- API:
- This public API is available in Java.
-
getShortLocalizedName
- Parameters:
locale
- the locale used to localize the name, ifnull
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
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
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
Gets the weekday of the current day- Returns:
- the current weekday. Never null.
- API:
- This public API is available in Java.
-
getWeekday
- Parameters:
calendarWeekdayValue
- the int constants used for weekdays in theCalendar
- Returns:
- the weekday of the given weekdayCalendarValue
- API:
- This public API is available in Java.
-