haXe API Documentation
Back |
Indexclass DateTools
Available in flash, neko, js, flash9, php, cpp
The DateTools class contains some extra functionalities for Date
manipulation. It's stored in a different class in order to prevent
the standard Date
of being bloated and thus increasing the size of
each application using it.
- static function days(n : Float) : Float
-
Convert a number of days to a date-time
- static function delta(d : Date, t : Float) : Date
-
Returns a Date which time has been changed by
t
milliseconds.
- static function format(d : Date, f : String) : String
-
Format the date
d
according to the format f
. The format
is compatible with the strftime
standard format, except that there
is no support in Flash and JS for day and months names (due to lack
of proper internationalization API). On haXe/Neko/Windows, some
formats are not supported.
- static function getMonthDays(d : Date) : Int
-
Returns the number of days in a month
- static function hours(n : Float) : Float
-
Convert a number of hours to a date-time
- static function make(o : { seconds : Int, ms : Float, minutes : Int, hours : Int, days : Int}) : Float
-
Build a date-time from several components
- static function minutes(n : Float) : Float
-
Convert a number of minutes to a date-time
- static function parse(t : Float) : { seconds : Int, ms : Float, minutes : Int, hours : Int, days : Int}
-
Separate a date-time into several components
- static function seconds(n : Float) : Float
-
Convert a number of seconds to a date-time
Back |
Index