time
This module provides date and time functions. e.g. now()
, datetime()
, current_millis()
, etc.
There are no constants.
create_datetime()
— Create a Unix timestamp (in seconds)current_millis()
— Get current Unix timestamp in millisecondsdatetime()
— Format a date timeget_day()
— Get day value (1 to 31) from the given timestampget_hour()
— Get hour value (0 to 23) from the given timestampget_minute()
— Get minute value (0 to 59) from the given timestampget_month()
— Get month value (1 to 12) from the given timestampget_second()
— Get second value (0 to 59) from the given timestampget_timezone()
— Get timezone abbreviation from the given timestampget_weekday()
— Get week day value (0 to 6, where Sunday is 0)get_year()
— Get year value from the given timestampget_yearday()
— Get year day value (1 to 365, since January 1st)is_dst()
— Get Daylight Saving Time flag from the given timestampnow()
— Get current Unix timestamp in secondsset_timelocale()
— Set date time localesleep()
— Pause the program for the amount of time (in milliseconds)sleep_s()
— Pause the program for the amount of time (in seconds)time_diff()
— Calculate the difference in seconds between two dates (date1
and date2
)There are no classes.