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

  1. Object
  2. Enum<DayOfWeek>
  3. DayOfWeek

ImplementsComparable<DayOfWeek>, TemporalAccessor

The seven days of the week, Monday first as ISO counts them.

Enum constants

MONDAYMonday, day 1.
TUESDAYTuesday, day 2.
WEDNESDAYWednesday, day 3.
THURSDAYThursday, day 4.
FRIDAYFriday, day 5.
SATURDAYSaturday, day 6.
SUNDAYSunday, 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

MONDAY
Monday, day 1.

TUESDAY

TUESDAY
Tuesday, day 2.

WEDNESDAY

WEDNESDAY
Wednesday, day 3.

THURSDAY

THURSDAY
Thursday, day 4.

FRIDAY

FRIDAY
Friday, day 5.

SATURDAY

SATURDAY
Saturday, day 6.

SUNDAY

SUNDAY
Sunday, 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.