org.threeten.bp

Month

object Month extends Serializable

A month-of-year, such as 'July'.

Month is an enum representing the 12 months of the year - January, February, March, April, May, June, July, August, September, October, November and December.

In addition to the textual enum name, each month-of-year has an int value. The int value follows normal usage and the ISO-8601 standard, from 1 (January) to 12 (December). It is recommended that applications use the enum rather than the int value to ensure code clarity.

Do not use ` ordinal()` to obtain the numeric representation of ` Month`. 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 month-of-year concept defined exactly equivalent to the ISO-8601 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. Month
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. val APRIL: Month

    The singleton instance for the month of April with 30 days.

    The singleton instance for the month of April with 30 days. This has the numeric value of 4.

  7. val AUGUST: Month

    The singleton instance for the month of August with 31 days.

    The singleton instance for the month of August with 31 days. This has the numeric value of 8.

  8. val DECEMBER: Month

    The singleton instance for the month of December with 31 days.

    The singleton instance for the month of December with 31 days. This has the numeric value of 12.

  9. val FEBRUARY: Month

    The singleton instance for the month of February with 28 days, or 29 in a leap year.

    The singleton instance for the month of February with 28 days, or 29 in a leap year. This has the numeric value of 2.

  10. val JANUARY: Month

    The singleton instance for the month of January with 31 days.

    The singleton instance for the month of January with 31 days. This has the numeric value of 1.

  11. val JULY: Month

    The singleton instance for the month of July with 31 days.

    The singleton instance for the month of July with 31 days. This has the numeric value of 7.

  12. val JUNE: Month

    The singleton instance for the month of June with 30 days.

    The singleton instance for the month of June with 30 days. This has the numeric value of 6.

  13. val MARCH: Month

    The singleton instance for the month of March with 31 days.

    The singleton instance for the month of March with 31 days. This has the numeric value of 3.

  14. val MAY: Month

    The singleton instance for the month of May with 31 days.

    The singleton instance for the month of May with 31 days. This has the numeric value of 5.

  15. val NOVEMBER: Month

    The singleton instance for the month of November with 30 days.

    The singleton instance for the month of November with 30 days. This has the numeric value of 11.

  16. val OCTOBER: Month

    The singleton instance for the month of October with 31 days.

    The singleton instance for the month of October with 31 days. This has the numeric value of 10.

  17. val SEPTEMBER: Month

    The singleton instance for the month of September with 30 days.

    The singleton instance for the month of September with 30 days. This has the numeric value of 9.

  18. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  19. def clone(): AnyRef

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

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

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

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

    Obtains an instance of Month from a temporal object.

    Obtains an instance of Month 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 Month.

    The conversion extracts the ChronoField#MONTH_OF_YEAR MONTH_OF_YEAR field. The extraction is only permitted if the temporal object has an ISO chronology, or can be converted to a LocalDate.

    This method matches the signature of the functional interface TemporalQuery allowing it to be used in queries via method reference, Month::from.

    temporal

    the temporal object to convert, not null

    returns

    the month-of-year, not null

    Exceptions thrown
    DateTimeException

    if unable to convert to a { @code Month}

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

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

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

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

    Definition Classes
    AnyRef
  28. final def notify(): Unit

    Definition Classes
    AnyRef
  29. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  30. def of(month: Int): Month

    Obtains an instance of Month from an int value.

    Obtains an instance of Month from an int value.

    Month is an enum representing the 12 months of the year. This factory allows the enum to be obtained from the int value. The int value follows the ISO-8601 standard, from 1 (January) to 12 (December).

    month

    the month-of-year to represent, from 1 (January) to 12 (December)

    returns

    the month-of-year, not null

    Exceptions thrown
    DateTimeException

    if the month-of-year is invalid

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

    Definition Classes
    AnyRef
  32. def toString(): String

    Definition Classes
    AnyRef → Any
  33. def valueOf(enum: String): Month

  34. val values: Array[Month]

  35. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped