Object/Class

org.threeten.bp

DayOfWeek

Related Docs: class DayOfWeek | package bp

Permalink

object DayOfWeek extends Serializable

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. The int value follows the ISO-8601 standard, from 1 (Monday) to 7 (Sunday). It is recommended that applications use the enum rather than the int 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 of DayOfWeek. Use getValue() 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.

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DayOfWeek
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. lazy val FRIDAY: DayOfWeek

    Permalink

    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.

  5. lazy val MONDAY: DayOfWeek

    Permalink

    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.

  6. lazy val SATURDAY: DayOfWeek

    Permalink

    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.

  7. lazy val SUNDAY: DayOfWeek

    Permalink

    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.

  8. lazy val THURSDAY: DayOfWeek

    Permalink

    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.

  9. lazy val TUESDAY: DayOfWeek

    Permalink

    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.

  10. lazy val WEDNESDAY: DayOfWeek

    Permalink

    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.

  11. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  12. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  15. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. def from(temporal: TemporalAccessor): DayOfWeek

    Permalink

    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.

    temporal

    the temporal object to convert, not null

    returns

    the day-of-week, not null

    Exceptions thrown

    DateTimeException if unable to convert to a { @code DayOfWeek}

  17. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  18. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  19. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  20. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. def of(dayOfWeek: Int): DayOfWeek

    Permalink

    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).

    dayOfWeek

    the day-of-week to represent, from 1 (Monday) to 7 (Sunday)

    returns

    the day-of-week singleton, not null

    Exceptions thrown

    DateTimeException if the day-of-week is invalid

  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  25. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  26. def valueOf(enum: String): DayOfWeek

    Permalink
  27. lazy val values: Array[DayOfWeek]

    Permalink
  28. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped