JavaScript is disabled on your browser.
JavaScript is disabled on your browser.
Uses of Class java.time.DayOfWeek
Packages that use DayOfWeek
Package
Description
java.time
The main API for dates, times, instants, and durations.
java.time.temporal
Access to date and time using fields and units, and date time adjusters.
java.time.zone
Support for time-zones and their rules.
Methods in java.time that return DayOfWeek
Modifier and Type
Method
Description
static DayOfWeek
DayOfWeek. from (TemporalAccessor temporal)
Obtains an instance of DayOfWeek
from a temporal object.
DayOfWeek
LocalDate. getDayOfWeek ()
Gets the day-of-week field, which is an enum DayOfWeek
.
DayOfWeek
LocalDateTime. getDayOfWeek ()
Gets the day-of-week field, which is an enum DayOfWeek
.
DayOfWeek
OffsetDateTime. getDayOfWeek ()
Gets the day-of-week field, which is an enum DayOfWeek
.
DayOfWeek
ZonedDateTime. getDayOfWeek ()
Gets the day-of-week field, which is an enum DayOfWeek
.
DayOfWeek
DayOfWeek. minus (long days)
Returns the day-of-week that is the specified number of days before this one.
static DayOfWeek
DayOfWeek. of (int dayOfWeek)
Obtains an instance of DayOfWeek
from an int
value.
DayOfWeek
DayOfWeek. plus (long days)
Returns the day-of-week that is the specified number of days after this one.
static DayOfWeek
DayOfWeek. valueOf (String name)
Returns the enum constant of this type with the specified name.
static DayOfWeek []
DayOfWeek. values ()
Returns an array containing the constants of this enum type, in
the order they are declared.
Methods in java.time.temporal with parameters of type DayOfWeek
Modifier and Type
Method
Description
static TemporalAdjuster
TemporalAdjusters. dayOfWeekInMonth (int ordinal,
DayOfWeek dayOfWeek)
Returns the day-of-week in month adjuster, which returns a new date
with the ordinal day-of-week based on the month.
static TemporalAdjuster
TemporalAdjusters. firstInMonth (DayOfWeek dayOfWeek)
Returns the first in month adjuster, which returns a new date
in the same month with the first matching day-of-week.
static TemporalAdjuster
TemporalAdjusters. lastInMonth (DayOfWeek dayOfWeek)
Returns the last in month adjuster, which returns a new date
in the same month with the last matching day-of-week.
static TemporalAdjuster
TemporalAdjusters. next (DayOfWeek dayOfWeek)
Returns the next day-of-week adjuster, which adjusts the date to the
first occurrence of the specified day-of-week after the date being adjusted.
static TemporalAdjuster
TemporalAdjusters. nextOrSame (DayOfWeek dayOfWeek)
Returns the next-or-same day-of-week adjuster, which adjusts the date to the
first occurrence of the specified day-of-week after the date being adjusted
unless it is already on that day in which case the same object is returned.
static WeekFields
WeekFields. of (DayOfWeek firstDayOfWeek,
int minimalDaysInFirstWeek)
Obtains an instance of WeekFields
from the first day-of-week and minimal days.
static TemporalAdjuster
TemporalAdjusters. previous (DayOfWeek dayOfWeek)
Returns the previous day-of-week adjuster, which adjusts the date to the
first occurrence of the specified day-of-week before the date being adjusted.
static TemporalAdjuster
TemporalAdjusters. previousOrSame (DayOfWeek dayOfWeek)
Returns the previous-or-same day-of-week adjuster, which adjusts the date to the
first occurrence of the specified day-of-week before the date being adjusted
unless it is already on that day in which case the same object is returned.
JavaScript is disabled on your browser.
Report a bug or suggest an enhancement For further API reference and developer documentation see the Java SE Documentation , which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples. Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries. Copyright © 1993, 2017, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA. All rights reserved. Use is subject to license terms and the documentation redistribution policy .
Scripting on this page tracks web page traffic, but does not change the content in any way.