Date

class DateAvailable in flash8, flash, neko, js, php, cpp, cs, javaThe Date class is used for date manipulation. There are some extra functions available in the DateTools class. function new( year : Int, month : Int, day : Int, hour : Int, min : Int, sec : Int ) : VoidAvailable in cs, javaCreates a new date object. Note that for month, Jan is 0, Dec is 11. function new( year : Int, month : Int, day : Int, hour : Int, min : Int, sec : Int ) : VoidAvailable in flash8, flash, neko, js, php, cppCreates a new date object. Note that for month, Jan is 0, Dec is 11. function getDate() : IntAvailable in cs, javaReturns the day of the date (1-31 range). function getDate() : IntAvailable in flash8, flash, neko, js, php, cppReturns the day of the date (1-31 range). function getDay() : IntAvailable in cs, javaReturns the week day of the date (0-6 range). function getDay() : IntAvailable in flash8, flash, neko, js, php, cppReturns the week day of the date (0-6 range). function getFullYear() : IntAvailable in cs, javaReturns the full year of the date. function getFullYear() : IntAvailable in flash8, flash, neko, js, php, cppReturns the full year of the date. function getHours() : IntAvailable in cs, javaReturns the hours value of the date (0-23 range). function getHours() : IntAvailable in flash8, flash, neko, js, php, cppReturns the hours value of the date (0-23 range). function getMinutes() : IntAvailable in cs, javaReturns the minutes value of the date (0-59 range). function getMinutes() : IntAvailable in flash8, flash, neko, js, php, cppReturns the minutes value of the date (0-59 range). function getMonth() : IntAvailable in cs, javaReturns the month of the date (0-11 range). function getMonth() : IntAvailable in flash8, flash, neko, js, php, cppReturns the month of the date (0-11 range). function getSeconds() : IntAvailable in cs, javaReturns the seconds of the date (0-59 range). function getSeconds() : IntAvailable in flash8, flash, neko, js, php, cppReturns the seconds of the date (0-59 range). function getTime() : FloatAvailable in cs, javaReturns 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 getTime() : FloatAvailable in flash8, flash, neko, js, php, cppReturns 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() : StringAvailable in cs, javaReturns a string representation for the Date, by using the standard format YYYY-MM-DD HH:MM:SS. See DateTools.format for other formating rules. function toString() : StringAvailable in flash8, flash, neko, js, php, cppReturns 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 ) : DateAvailable in cs, javaReturns 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 fromString( s : String ) : DateAvailable in flash8, flash, neko, js, php, cppReturns 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 ) : DateAvailable in cs, javaReturns a Date from a timestamp t which is the number of milliseconds elapsed since 1st January 1970. static function fromTime( t : Float ) : DateAvailable in flash8, flash, neko, js, php, cppReturns 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 #19306, modified 2013-05-08 11:13:07 by api
0 comment