java.time

MonthDay

object MonthDay extends Serializable

Annotations
@SerialVersionUID( 939150713474957432L )
Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MonthDay
  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. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

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

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

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

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

    Obtains an instance of MonthDay from a temporal object.

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

    The conversion extracts the ChronoField#MONTH_OF_YEAR MONTH_OF_YEAR and ChronoField#DAY_OF_MONTH DAY_OF_MONTH fields. The extraction is only permitted if the date-time has an ISO chronology.

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

    temporal

    the temporal object to convert, not null

    returns

    the month-day, not null

    Exceptions thrown
    DateTimeException

    if unable to convert to a { @code MonthDay}

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

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

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

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

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

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

    Definition Classes
    AnyRef
  18. def now(clock: Clock): MonthDay

    Obtains the current month-day from the specified clock.

    Obtains the current month-day from the specified clock.

    This will query the specified clock to obtain the current month-day. Using this method allows the use of an alternate clock for testing. The alternate clock may be introduced using Clock dependency injection.

    clock

    the clock to use, not null

    returns

    the current month-day, not null

  19. def now(zone: ZoneId): MonthDay

    Obtains the current month-day from the system clock in the specified time-zone.

    Obtains the current month-day from the system clock in the specified time-zone.

    This will query the Clock#system(ZoneId) system clock to obtain the current month-day. Specifying the time-zone avoids dependence on the default time-zone.

    Using this method will prevent the ability to use an alternate clock for testing because the clock is hard-coded.

    zone

    the zone ID to use, not null

    returns

    the current month-day using the system clock, not null

  20. def now: MonthDay

    Obtains the current month-day from the system clock in the default time-zone.

    Obtains the current month-day from the system clock in the default time-zone.

    This will query the Clock#systemDefaultZone() system clock in the default time-zone to obtain the current month-day.

    Using this method will prevent the ability to use an alternate clock for testing because the clock is hard-coded.

    returns

    the current month-day using the system clock and default time-zone, not null

  21. def of(month: Int, dayOfMonth: Int): MonthDay

    Obtains an instance of MonthDay.

    Obtains an instance of MonthDay.

    The day-of-month must be valid for the month within a leap year. Hence, for month 2 (February), day 29 is valid.

    For example, passing in month 4 (April) and day 31 will throw an exception, as there can never be April 31st in any year. By contrast, passing in February 29th is permitted, as that month-day can sometimes be valid.

    month

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

    dayOfMonth

    the day-of-month to represent, from 1 to 31

    returns

    the month-day, not null

    Exceptions thrown
    DateTimeException

    if the day-of-month is invalid for the month

  22. def of(month: Month, dayOfMonth: Int): MonthDay

    Obtains an instance of MonthDay.

    Obtains an instance of MonthDay.

    The day-of-month must be valid for the month within a leap year. Hence, for February, day 29 is valid.

    For example, passing in April and day 31 will throw an exception, as there can never be April 31st in any year. By contrast, passing in February 29th is permitted, as that month-day can sometimes be valid.

    month

    the month-of-year to represent, not null

    dayOfMonth

    the day-of-month to represent, from 1 to 31

    returns

    the month-day, not null

    Exceptions thrown
    DateTimeException

    if the day-of-month is invalid for the month

  23. def parse(text: CharSequence, formatter: DateTimeFormatter): MonthDay

    Obtains an instance of MonthDay from a text string using a specific formatter.

    Obtains an instance of MonthDay from a text string using a specific formatter.

    The text is parsed using the formatter, returning a month-day.

    text

    the text to parse, not null

    formatter

    the formatter to use, not null

    returns

    the parsed month-day, not null

    Exceptions thrown
    DateTimeParseException

    if the text cannot be parsed

  24. def parse(text: CharSequence): MonthDay

    Obtains an instance of MonthDay from a text string such as --12-03.

    Obtains an instance of MonthDay from a text string such as --12-03.

    The string must represent a valid month-day. The format is --MM-dd.

    text

    the text to parse such as "--12-03", not null

    returns

    the parsed month-day, not null

    Exceptions thrown
    DateTimeParseException

    if the text cannot be parsed

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

    Definition Classes
    AnyRef
  26. def toString(): String

    Definition Classes
    AnyRef → Any
  27. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped