Functions
Adds the provided number of days to the provided date instance.
Adds the provided number of hours to the provided date instance.
Adds the provided number of minutes to the provided date instance.
Adds the provided number of seconds to the provided date instance.
Duplicates a JulianDate instance.
Compares two instances.
Computes the number of seconds the provided instance is ahead of UTC.
Computes the difference in days between the provided instance.
Compares two instances and returns true
if they are equal, false
otherwise.
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
.
Creates a new instance from a JavaScript Date.
Creates a new instance from a GregorianDate.
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.
Compares the provided instances and returns true
if left
is later than right
, false
otherwise.
Compares the provided instances and returns true
if left
is later than or equal to right
, false
otherwise.
Compares the provided instances and returns true
if left
is earlier than right
, false
otherwise.
Compares the provided instances and returns true
if left
is earlier than or equal to right
, false
otherwise.
Creates a new instance that represents the current system time. This is equivalent to calling JulianDate.fromDate(new Date());
.
Computes the difference in seconds between the provided instance.
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.
Creates a GregorianDate from the provided instance.
Creates an ISO8601 representation of the provided date.
Computes the total number of whole and fractional days represented by the provided instance.