Rope Language Reference - 'tm_sec', 'tm_min', Etc

These actions take a broken-down time buffer as returned by localtime or gmtime, and return one of the components of the time as an integer.

For a tutorial-style description of Rope's time and date handling features, see TimeAndDate.

The actions and their returns are..

tm_sec The number of seconds after the minute, normally in the range 0 to 59, but can be up to 61 to allow for leap seconds.

tm_min The number of minutes after the hour, in the range 0 to 59.

tm_hour The number of hours past midnight, in the range 0 to 23.

tm_mday The day of the month, in the range 1 to 31.

tm_mon The number of months since January, in the range 0 to 11.

tm_year The number of years since 1900.

tm_wday The number of days since Sunday, in the range 0 to 6.

The following example prints the current time.

$kernel_time localtime $t put
println($t tm_hour ":" $t tm_min ":" $t tm_sec)

Revision History

These actions were added to the code on Feb 14th, 2005 - and are therefore not available in versions released before that date.

See Also

TimeAndDate, localtime, gmtime, $kernel_time, $packet_time