The Date class provides a basic structure for date and time related information. Date instances can be created by
new Date()for a specific date,
Date.now()to obtain information about the current time,
Date.fromTime()with a given timestamp or
Date.fromString()by parsing from a String.
There are some extra functions available in the
In the context of Haxe dates, a timestamp is defined as the number of milliseconds elapsed since 1st January 1970.
Returns the timestamp (in milliseconds) of the date. It might only have a per-second precision depending on the platforms.
For measuring time differences with millisecond accuracy on
all platforms, see
Returns a Date from a formatted string
s, with the following accepted
The first two formats are expressed in local time, the third in UTC Epoch.