Object

org.threeten.bp.temporal

JulianFields

Related Doc: package temporal

Permalink

object JulianFields

A set of date fields that provide access to Julian Days.

The Julian Day is a standard way of expressing date and time commonly used in the scientific community. It is expressed as a decimal number of whole days where days start at midday. This class represents variations on Julian Days that count whole days from midnight.

Specification for implementors

This is an immutable and thread-safe class.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. JulianFields
  2. AnyRef
  3. 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 JULIAN_DAY: TemporalField

    Permalink

    Julian Day field.

    Julian Day field.

    This is an integer-based version of the Julian Day Number. Julian Day is a well-known system that represents the count of whole days since day 0, which is defined to be January 1, 4713 BCE in the Julian calendar, and -4713-11-24 Gregorian. The field has "JulianDay" as 'name', and 'DAYS' as 'baseUnit'. The field always refers to the local date-time, ignoring the offset or zone.

    For date-times, 'JULIAN_DAY.getFrom()' assumes the same value from midnight until just before the next midnight. When 'JULIAN_DAY.adjustInto()' is applied to a date-time, the time of day portion remains unaltered. 'JULIAN_DAY.adjustInto()' and 'JULIAN_DAY.getFrom()' only apply to Temporal objects that can be converted into ChronoField#EPOCH_DAY. A DateTimeException is thrown for any other type of object.

    Astronomical and Scientific Notes

    The standard astronomical definition uses a fraction to indicate the time-of-day, thus 3.25 would represent the time 18:00, since days start at midday. This implementation uses an integer and days starting at midnight. The integer value for the Julian Day Number is the astronomical Julian Day value at midday of the date in question. This amounts to the astronomical Julian Day, rounded to an integer JDN = floor(JD + 0.5).

    | ISO date          |  Julian Day Number | Astronomical Julian Day |
    | 1970-01-01T00:00  |         2,440,588  |         2,440,587.5     |
    | 1970-01-01T06:00  |         2,440,588  |         2,440,587.75    |
    | 1970-01-01T12:00  |         2,440,588  |         2,440,588.0     |
    | 1970-01-01T18:00  |         2,440,588  |         2,440,588.25    |
    | 1970-01-02T00:00  |         2,440,589  |         2,440,588.5     |
    | 1970-01-02T06:00  |         2,440,589  |         2,440,588.75    |
    | 1970-01-02T12:00  |         2,440,589  |         2,440,589.0     |
    

    Julian Days are sometimes taken to imply Universal Time or UTC, but this implementation always uses the Julian Day number for the local date, regardless of the offset or time-zone.

  5. val MODIFIED_JULIAN_DAY: TemporalField

    Permalink

    Modified Julian Day field.

    Modified Julian Day field.

    This is an integer-based version of the Modified Julian Day Number. Modified Julian Day (MJD) is a well-known system that counts days continuously. It is defined relative to astronomical Julian Day as MJD = JD - 2400000.5. Each Modified Julian Day runs from midnight to midnight. The field always refers to the local date-time, ignoring the offset or zone.

    For date-times, 'MODIFIED_JULIAN_DAY.getFrom()' assumes the same value from midnight until just before the next midnight. When 'MODIFIED_JULIAN_DAY.adjustInto()' is applied to a date-time, the time of day portion remains unaltered. 'MODIFIED_JULIAN_DAY.adjustInto()' and 'MODIFIED_JULIAN_DAY.getFrom()' only apply to Temporal objects that can be converted into ChronoField#EPOCH_DAY. A DateTimeException is thrown for any other type of object.

    This implementation is an integer version of MJD with the decimal part rounded to floor.

    Astronomical and Scientific Notes

    | ISO date          | Modified Julian Day |      Decimal MJD |
    | 1970-01-01T00:00  |             40,587  |       40,587.0   |
    | 1970-01-01T06:00  |             40,587  |       40,587.25  |
    | 1970-01-01T12:00  |             40,587  |       40,587.5   |
    | 1970-01-01T18:00  |             40,587  |       40,587.75  |
    | 1970-01-02T00:00  |             40,588  |       40,588.0   |
    | 1970-01-02T06:00  |             40,588  |       40,588.25  |
    | 1970-01-02T12:00  |             40,588  |       40,588.5   |
    

    Modified Julian Days are sometimes taken to imply Universal Time or UTC, but this implementation always uses the Modified Julian Day for the local date, regardless of the offset or time-zone.

  6. val RATA_DIE: TemporalField

    Permalink

    Rata Die field.

    Rata Die field.

    Rata Die counts whole days continuously starting day 1 at midnight at the beginning of 0001-01-01 (ISO). The field always refers to the local date-time, ignoring the offset or zone.

    For date-times, 'RATA_DIE.getFrom()' assumes the same value from midnight until just before the next midnight. When 'RATA_DIE.adjustInto()' is applied to a date-time, the time of day portion remains unaltered. 'MODIFIED_JULIAN_DAY.adjustInto()' and 'RATA_DIE.getFrom()' only apply to Temporal objects that can be converted into ChronoField#EPOCH_DAY. A DateTimeException is thrown for any other type of object.

  7. final def asInstanceOf[T0]: T0

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

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

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  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. final def synchronized[T0](arg0: ⇒ T0): T0

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

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

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped