haXe

Date

extern class DateAvailable in flash, flash9, neko, js, phpThe Date class is used for date manipulation. There is some extra functions available in the DateTools class. function new( year : Int, month : Int, day : Int, hour : Int, min : Int, sec : Int ) : VoidCreates a new date object. function getDate() : IntReturns the day of the date (1-31 range). function getDay() : IntReturns the week day of the date (0-6 range). function getFullYear() : IntReturns the full year of the date. function getHours() : IntReturns the hours value of the date (0-23 range). function getLocaleLongDate() : StringAvailable in flashflash lite only function getLocaleShortDate() : StringAvailable in flashflash lite only function getLocaleTime() : StringAvailable in flashflash lite only function getMinutes() : IntReturns the minutes value of the date (0-59 range). function getMonth() : IntReturns the month of the date (0-11 range). function getSeconds() : IntReturns the seconds of the date (0-59 range). function getTime() : FloatReturns the timestamp of the date. It's the number of milliseconds elapsed since 1st January 1970. It might only have a per-second precision depending on the platforms. function toString() : StringReturns a string representation for the Date, by using the standard format YYYY-MM-DD HH:MM:SS. See DateTools.format for other formating rules. static function fromString( s : String ) : DateReturns a Date from a formated string of one of the following formats : YYYY-MM-DD hh:mm:ss or YYYY-MM-DD or hh:mm:ss. The first two formats are expressed in local time, the third in UTC Epoch. static function fromTime( t : Float ) : DateReturns a Date from a timestamp t which is the number of milliseconds elapsed since 1st January 1970. static function now() : DateReturns a Date representing the current local time.
version #2464, modified 2008-07-28 10:02:39 by api