library library

Extension Types

Date
An immutable type representing a calendar date without time components. All dates are stored internally in UTC timezone. Any non-UTC input DateTime will be converted to UTC during construction.
Time
An immutable type representing a time of day without date components. All times are stored internally in UTC timezone. Any non-UTC input DateTime will be converted to UTC during construction.

Constants

nowKey → const Symbol
A key used in Zone values to provide custom DateTime implementations. Any DateTime returned will be converted to UTC before use.

Properties

now DateTime
Gets the current UTC date and time as a DateTime.
no setter
nowAsIso8601 String
Gets the current UTC date and time as an ISO 8601 string.
no setter
nowLocal DateTime
Gets the current local date and time as a DateTime.
no setter
nowLocalAsIso8601 String
Gets the current local date and time as an ISO 8601 string.
no setter

Functions

combineDateAndTime(Date date, Time time) DateTime
Combines a Date and Time into a single DateTime instance. The resulting DateTime will be in UTC. Note that Date and Time instances are always in UTC internally, as they convert any input to UTC during construction.

Typedefs

Now = DateTime Function()
A function type that provides the current DateTime.