Object/Class

org.threeten.bp

Month

Related Docs: class Month | package bp

Permalink

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
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 APRIL: Month

    Permalink

    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.

  5. lazy val AUGUST: Month

    Permalink

    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.

  6. lazy val DECEMBER: Month

    Permalink

    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.

  7. lazy val FEBRUARY: Month

    Permalink

    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.

  8. lazy val JANUARY: Month

    Permalink

    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.

  9. lazy val JULY: Month

    Permalink

    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.

  10. lazy val JUNE: Month

    Permalink

    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.

  11. lazy val MARCH: Month

    Permalink

    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.

  12. lazy val MAY: Month

    Permalink

    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.

  13. lazy val NOVEMBER: Month

    Permalink

    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.

  14. lazy val OCTOBER: Month

    Permalink

    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.

  15. lazy val SEPTEMBER: Month

    Permalink

    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.

  16. final def asInstanceOf[T0]: T0

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

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

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

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

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

    Permalink

    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 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}

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

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

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

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

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

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

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

    Permalink

    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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  31. def valueOf(v: String): Month

    Permalink
  32. lazy val values: Array[Month]

    Permalink
  33. final def wait(): Unit

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. 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