Package-level declarations
Types
An exception for Date operations.
Allows to format and parse instances of Date, DateTime and DateTimeTz
Represents a Date in UTC (GMT+00) with millisecond precision.
Represents a right-opened range between two dates.
Immutable structure representing a set of a monthSpan and a duration. This structure loses information about which months are included, that makes it impossible to generate a real Duration including months. You can use DateTimeRange.duration to get this information from two real DateTime.
DateTime with an associated TimezoneOffset
Analogous to Duration but doesn't allocate on the JS target. Important when used intensively in JS code. For example in KorGE.
Represents one of the twelve months of the year.
Represents a number of years and months temporal distance.
Class for measuring relative times with as much precision as possible.
Represents a union of millisecond, second, minute and hour.
Class to provide time that can be overridden to mock or change its behaviour.
Class to count the number of times a sample was added in a timeWindow
Represents a span of time, with milliseconds precision.
Represents a time zone offset with millisecond precision. Usually minute is enough. Can be used along DateTimeTz to construct non universal, local times.
Represents a Year in a typed way.
Properties
Returns this date with the local offset of this device. Components might change because of the offset.
The local offset for this date for the timezone of the device
Returns a new local date that will match these components.
Duration representing this number as microseconds or 1 / 1_000_000 seconds.
Returns the total number of microseconds for this Duration (1 / 1_000_000 seconds)
Returns the total number of microseconds for this Duration (1 / 1_000_000 seconds) as Integer
Duration representing this number as milliseconds or 1 / 1_000 seconds.
Returns the total number of milliseconds as an Int
Returns the total number of milliseconds as a Long
Duration representing this number as nanoseconds or 1 / 1_000_000_000 seconds.
Returns the total number of nanoseconds for this Duration (1 / 1_000_000_000 seconds)
Returns the total number of nanoseconds for this Duration (1 / 1_000_000_000 seconds) as Integer
Returns the total number of nanoseconds for this Duration (1 / 1_000_000_000 seconds)
A Duration as a TimezoneOffset.
Total years of this MonthSpan as double (might contain decimals)
Returns this date with a 0 offset. Components are equal.
Functions
Sleeps the thread during the specified time. Spinlocks on JS
Executes a callback and measure the time it takes to complete.
Converts this date to String using format for representing it
Constructs a new DateTime from date and time information.
Executes the callback measuring the time it takes to complete. Returns a TimedResult with the time and the return value of the callback.
Returns the current local time as DateTimeTz.
Returns this date with a local offset. Components might change because of the offset.
Returns a new local date that will match these components but with a different offset.
Converts this date to String using the DateFormat.DEFAULT_FORMAT for representing it
Returns this date with a local offset. Components might change because of the timeZone.