An absolute time + a relative time gives a new absolute time.
A relative time (i.e., a duration) + another relative time gives a new relative time.
The difference between two absolute times is a relative time. If abs1 > abs2 the difference would be negative, so this method returns a zero relative time instead.
Coerces to a RelativeTime if possible. If a brand is provided, ensure it matches and return a RelativeTime labeled with that brand.
Coerces to a TimestampRecord if possible, else throws. If the value has a brand, ensure it matches. Return a Timestamp labeled with that brand.
Compares two absolute times. This comparison function is compatible
with JavaScript's Array.prototype.sort and so can be used to sort an
array of absolute times. The result is -1, 0, or 1 indicating whether
the first argument is less than, equal, or greater than the second.
Compares two relative times. This comparison function is compatible
with JavaScript's Array.prototype.sort and so can be used to sort an
array of relative times. The result is -1, 0, or 1 indicating whether
the first argument is less than, equal, or greater than the second.
Does it represent a zero relative time, i.e., the difference of an absolute time with itself? (We choose not to define a similar isAbsZero, even though we could, because it is much less likely to be meaningful.)
An absolute time modulo a relative time is a relative time. For example, 20:17 on July 20, 1969 modulo 1 day is just 20:17, a relative time that can be added to the beginning of any day.
A relative time modulo a relative time is a relative time. For example, 3.5 hours modulo an hour is 30 minutes.
Validates that the operand represents a RelativeTime and returns the
bigint representing its relative time value.
During the transition explained in theTimeMath comment,
relValue will also accept a bigint which it then just returns.
The difference between two absolute times is a relative time. If abs1 > abs2 the difference would be negative, so this method throws instead.
An absolute time - a relative time gives a new absolute time
The difference between two relative times.
Generated using TypeDoc
Validates that the operand represents a
Timestampand returns the bigint representing its absolute time value. During the transition explained in theTimeMathcomment,absValuewill also accept a bigint which it then just returns.