Companion

external object Companion(source)

Properties

Link copied to clipboard

Gets or sets the list of leap seconds used throughout Cesium.

Functions

Link copied to clipboard
external fun addDays(julianDate: JulianDate, days: Int, result: JulianDate): JulianDate

Adds the provided number of days to the provided date instance.

Link copied to clipboard
external fun addHours(julianDate: JulianDate, hours: Int, result: JulianDate): JulianDate

Adds the provided number of hours to the provided date instance.

Link copied to clipboard
external fun addMinutes(julianDate: JulianDate, minutes: Int, result: JulianDate): JulianDate

Adds the provided number of minutes to the provided date instance.

Link copied to clipboard
external fun addSeconds(julianDate: JulianDate, seconds: Int, result: JulianDate): JulianDate

Adds the provided number of seconds to the provided date instance.

Link copied to clipboard
external fun clone(julianDate: JulianDate, result: JulianDate? = definedExternally): JulianDate

Duplicates a JulianDate instance.

Link copied to clipboard
external fun compare(left: JulianDate, right: JulianDate): Double

Compares two instances.

Link copied to clipboard
external fun computeTaiMinusUtc(julianDate: JulianDate): Double

Computes the number of seconds the provided instance is ahead of UTC.

Link copied to clipboard
external fun daysDifference(left: JulianDate, right: JulianDate): Double

Computes the difference in days between the provided instance.

Link copied to clipboard
external fun equals(left: JulianDate? = definedExternally, right: JulianDate? = definedExternally): Boolean

Compares two instances and returns true if they are equal, false otherwise.

Link copied to clipboard
external fun equalsEpsilon(left: JulianDate? = definedExternally, right: JulianDate? = definedExternally, epsilon: Double? = definedExternally): Boolean

Compares two instances and returns true if they are within epsilon seconds of each other. That is, in order for the dates to be considered equal (and for this function to return true), the absolute value of the difference between them, in seconds, must be less than epsilon.

Link copied to clipboard
external fun fromDate(date: Date, result: JulianDate? = definedExternally): JulianDate

Creates a new instance from a JavaScript Date.

Link copied to clipboard
external fun fromGregorianDate(date: GregorianDate, result: JulianDate? = definedExternally): JulianDate

Creates a new instance from a GregorianDate.

Link copied to clipboard
external fun fromIso8601(iso8601String: String, result: JulianDate? = definedExternally): JulianDate

Creates a new instance from a from an ISO 8601 date. This method is superior to Date.parse because it will handle all valid formats defined by the ISO 8601 specification, including leap seconds and sub-millisecond times, which discarded by most JavaScript implementations.

Link copied to clipboard
external fun greaterThan(left: JulianDate, right: JulianDate): Boolean

Compares the provided instances and returns true if left is later than right, false otherwise.

Link copied to clipboard
external fun greaterThanOrEquals(left: JulianDate, right: JulianDate): Boolean

Compares the provided instances and returns true if left is later than or equal to right, false otherwise.

Link copied to clipboard
external fun lessThan(left: JulianDate, right: JulianDate): Boolean

Compares the provided instances and returns true if left is earlier than right, false otherwise.

Link copied to clipboard
external fun lessThanOrEquals(left: JulianDate, right: JulianDate): Boolean

Compares the provided instances and returns true if left is earlier than or equal to right, false otherwise.

Link copied to clipboard
external fun now(result: JulianDate? = definedExternally): JulianDate

Creates a new instance that represents the current system time. This is equivalent to calling JulianDate.fromDate(new Date());.

Link copied to clipboard
external fun secondsDifference(left: JulianDate, right: JulianDate): Double

Computes the difference in seconds between the provided instance.

Link copied to clipboard
external fun toDate(julianDate: JulianDate): Date

Creates a JavaScript Date from the provided instance. Since JavaScript dates are only accurate to the nearest millisecond and cannot represent a leap second, consider using JulianDate.toGregorianDate instead. If the provided JulianDate is during a leap second, the previous second is used.

Link copied to clipboard
external fun toGregorianDate(julianDate: JulianDate, result: GregorianDate? = definedExternally): GregorianDate

Creates a GregorianDate from the provided instance.

Link copied to clipboard
external fun toIso8601(julianDate: JulianDate, precision: Double? = definedExternally): String

Creates an ISO8601 representation of the provided date.

Link copied to clipboard
external fun totalDays(julianDate: JulianDate): Double

Computes the total number of whole and fractional days represented by the provided instance.