Date
Using this object you can work with date.
Can be created with new method, as current date, from timestamp or string:
Lib.Sys.Date.new(year, month, day, hour, min, sec) |
Creates a new date object from the given arguments. |
year - year month - 0 to 11 |
Lib.Sys.Date.now() |
Returns a Date representing the current local time. |
|
Lib.Sys.Date.fromTime(t) |
Returns a Date from timestamp t. |
t - timestamp (float) seconds with fractions |
Lib.Sys.Date.fromString(s) |
Returns a Date from a formated string s, with the following accepted formats: |
s - formated date string |
Created object has methods:
getTime() |
Returns the timestamp (in milliseconds) of the date. It might only have a per-second precision depending on the platforms. |
|
getHours() |
Returns the hours of `this` Date (0-23 range). |
|
getMinutes() |
Returns the minutes of `this` Date (0-59 range). |
|
getSeconds() |
Returns the seconds of `this` Date (0-59 range). |
|
getFullYear() |
Returns the full year of `this` Date (4-digits). |
|
getMonth() |
Returns the month of `this` Date (0-11 range). |
|
getDate() |
Returns the day of `this` Date (1-31 range). |
|
getDay() |
Returns the day of the week of `this` Date (0-6 range) where `0` is Sunday. |
|
toString() |
Returns a string representation of created Date object, by using the |
|
Created with the Personal Edition of HelpNDoc: Free EBook and documentation generator