Object/Class

org.threeten.bp

LocalDate

Related Docs: class LocalDate | package bp

Permalink

object LocalDate extends Serializable

Annotations
@SerialVersionUID()
Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LocalDate
  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. val MAX: LocalDate

    Permalink

    The maximum supported LocalDate, '+999999999-12-31'.

    The maximum supported LocalDate, '+999999999-12-31'. This could be used by an application as a "far future" date.

  5. val MIN: LocalDate

    Permalink

    The minimum supported LocalDate, '-999999999-01-01'.

    The minimum supported LocalDate, '-999999999-01-01'. This could be used by an application as a "far past" date.

  6. final def asInstanceOf[T0]: T0

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

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

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

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

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

    Permalink

    Obtains an instance of LocalDate from a temporal object.

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

    The conversion uses the TemporalQueries#localDate() query, which relies on extracting the EPOCH_DAY field.

    This method matches the signature of the functional interface TemporalQuery allowing it to be used as a query via method reference, LocalDate::from.

    temporal

    the temporal object to convert, not null

    returns

    the local date, not null

    Exceptions thrown

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

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

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

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

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

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

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

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

    Permalink

    Obtains the current date from the specified clock.

    Obtains the current date from the specified clock.

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

    clock

    the clock to use, not null

    returns

    the current date, not null

  19. def now(zone: ZoneId): LocalDate

    Permalink

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

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

    This will query the system clock to obtain the current date. 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 date using the system clock, not null

  20. def now: LocalDate

    Permalink

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

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

    This will query the system clock in the default time-zone to obtain the current date.

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

    returns

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

  21. def of(year: Int, month: Int, dayOfMonth: Int): LocalDate

    Permalink

    Obtains an instance of LocalDate from a year, month and day.

    Obtains an instance of LocalDate from a year, month and day.

    The day must be valid for the year and month, otherwise an exception will be thrown.

    year

    the year to represent, from MIN_YEAR to MAX_YEAR

    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 local date, not null

    Exceptions thrown

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

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

    Permalink

    Obtains an instance of LocalDate from a year, month and day.

    Obtains an instance of LocalDate from a year, month and day.

    The day must be valid for the year and month, otherwise an exception will be thrown.

    year

    the year to represent, from MIN_YEAR to MAX_YEAR

    month

    the month-of-year to represent, not null

    dayOfMonth

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

    returns

    the local date, not null

    Exceptions thrown

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

  23. def ofEpochDay(epochDay: Long): LocalDate

    Permalink

    Obtains an instance of LocalDate from the epoch day count.

    Obtains an instance of LocalDate from the epoch day count.

    The Epoch Day count is a simple incrementing count of days where day 0 is 1970-01-01. Negative numbers represent earlier days.

    epochDay

    the Epoch Day to convert, based on the epoch 1970-01-01

    returns

    the local date, not null

    Exceptions thrown

    DateTimeException if the epoch days exceeds the supported date range

  24. def ofYearDay(year: Int, dayOfYear: Int): LocalDate

    Permalink

    Obtains an instance of LocalDate from a year and day-of-year.

    Obtains an instance of LocalDate from a year and day-of-year.

    The day-of-year must be valid for the year, otherwise an exception will be thrown.

    year

    the year to represent, from MIN_YEAR to MAX_YEAR

    dayOfYear

    the day-of-year to represent, from 1 to 366

    returns

    the local date, not null

    Exceptions thrown

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

  25. def parse(text: CharSequence, formatter: DateTimeFormatter): LocalDate

    Permalink

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

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

    The text is parsed using the formatter, returning a date.

    text

    the text to parse, not null

    formatter

    the formatter to use, not null

    returns

    the parsed local date, not null

    Exceptions thrown

    DateTimeParseException if the text cannot be parsed

  26. def parse(text: CharSequence): LocalDate

    Permalink

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

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

    The string must represent a valid date and is parsed using org.threeten.bp.format.DateTimeFormatter#ISO_LOCAL_DATE.

    text

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

    returns

    the parsed local date, not null

    Exceptions thrown

    DateTimeParseException if the text cannot be parsed

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

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

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

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

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