The singleton instance for the day-of-week of Friday.
The singleton instance for the day-of-week of Friday.
This has the numeric value of 5
.
The singleton instance for the day-of-week of Monday.
The singleton instance for the day-of-week of Monday.
This has the numeric value of 1
.
The singleton instance for the day-of-week of Saturday.
The singleton instance for the day-of-week of Saturday.
This has the numeric value of 6
.
The singleton instance for the day-of-week of Sunday.
The singleton instance for the day-of-week of Sunday.
This has the numeric value of 7
.
The singleton instance for the day-of-week of Thursday.
The singleton instance for the day-of-week of Thursday.
This has the numeric value of 4
.
The singleton instance for the day-of-week of Tuesday.
The singleton instance for the day-of-week of Tuesday.
This has the numeric value of 2
.
The singleton instance for the day-of-week of Wednesday.
The singleton instance for the day-of-week of Wednesday.
This has the numeric value of 3
.
Obtains an instance of DayOfWeek
from a temporal object.
Obtains an instance of DayOfWeek
from a temporal object.
A TemporalAccessor
represents some form of date and time information.
This factory converts the arbitrary temporal object to an instance of DayOfWeek
.
The conversion extracts the DAY_OF_WEEK
field.
This method matches the signature of the functional interface TemporalQuery
allowing it to be used as a query via method reference, DayOfWeek::from
.
the temporal object to convert, not null
the day-of-week, not null
DateTimeException
if unable to convert to a { @code DayOfWeek}
Obtains an instance of DayOfWeek
from an int
value.
Obtains an instance of DayOfWeek
from an int
value.
DayOfWeek
is an enum representing the 7 days of the week.
This factory allows the enum to be obtained from the int
value.
The int
value follows the ISO-8601 standard, from 1 (Monday) to 7 (Sunday).
the day-of-week to represent, from 1 (Monday) to 7 (Sunday)
the day-of-week singleton, not null
DateTimeException
if the day-of-week is invalid
A day-of-week, such as 'Tuesday'.
DayOfWeek
is an enum representing the 7 days of the week - Monday, Tuesday, Wednesday, Thursday, Friday, Saturday and Sunday.In addition to the textual enum name, each day-of-week has an
int
value. Theint
value follows the ISO-8601 standard, from 1 (Monday) to 7 (Sunday). It is recommended that applications use the enum rather than theint
value to ensure code clarity.This enum provides access to the localized textual form of the day-of-week. Some locales also assign different numeric values to the days, declaring Sunday to have the value 1, however this class provides no support for this. See
WeekFields
for localized week-numbering.Do not use
ordinal()
to obtain the numeric representation ofDayOfWeek
. UsegetValue()
instead.This enum represents a common concept that is found in many calendar systems. As such, this enum may be used by any calendar system that has the day-of-week concept defined exactly equivalent to the ISO calendar system.
Specification for implementors
This is an immutable and thread-safe enum.