Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.
public enum DayOfWeek
- Object
- Enum<DayOfWeek>
- DayOfWeek
ImplementsComparable<DayOfWeek>, TemporalAccessor
The seven days of the week, Monday first as ISO counts them.
Enum constants
MONDAY | Monday, day 1. |
TUESDAY | Tuesday, day 2. |
WEDNESDAY | Wednesday, day 3. |
THURSDAY | Thursday, day 4. |
FRIDAY | Friday, day 5. |
SATURDAY | Saturday, day 6. |
SUNDAY | Sunday, day 7. |
Methods
public static DayOfWeek[] values() | |
public static DayOfWeek valueOf(String name) | |
public static DayOfWeek of(int dayOfWeek) | The day numbered dayOfWeek, 1 for Monday to 7 for Sunday. |
public int getValue() | 1 for Monday to 7 for Sunday. |
public DayOfWeek plus(long days) | The day days later, around the week. |
public DayOfWeek minus(long days) | The day days earlier, around the week. |
Inherited methods
Enum constant details
MONDAY
MONDAYMonday, day 1.
TUESDAY
TUESDAYTuesday, day 2.
WEDNESDAY
WEDNESDAYWednesday, day 3.
THURSDAY
THURSDAYThursday, day 4.
FRIDAY
FRIDAYFriday, day 5.
SATURDAY
SATURDAYSaturday, day 6.
SUNDAY
SUNDAYSunday, day 7.
Method details
values
public static DayOfWeek[] values()valueOf
public static DayOfWeek valueOf(String name)of
public static DayOfWeek of(int dayOfWeek)The day numbered
dayOfWeek, 1 for Monday to 7 for Sunday.getValue
public int getValue()1 for Monday to 7 for Sunday.
plus
public DayOfWeek plus(long days)The day
days later, around the week.minus
public DayOfWeek minus(long days)The day
days earlier, around the week.