2,875
edits
(Created page with "== TimeSpan Module Documentation == The 'TimeSpan' module provides functionality for working with time spans in Lua. === Constructor === ====TimeSpan.new(days, hours, minutes, seconds, milliseconds)==== Creates a new 'TimeSpan' object representing the specified time components. * '''Parameters:''' * `'days'`: Number of days (default: `0`). * `'hours'`: Number of hours (default: `0`). * `'minutes'`: Number of minutes (default: `0`). * `'seconds'`: Number of s...") |
|||
Line 118: | Line 118: | ||
-- Get specific components of the TimeSpan | -- Get specific components of the TimeSpan | ||
print("Days:", ts:getDays()) -- Output: 1 | |||
print("Hours:", ts:getHours()) -- Output: 2 | |||
print("Minutes:", ts:getMinutes()) -- Output: 30 | |||
print("Seconds:", ts:getSeconds()) -- Output: 15 | |||
print("Milliseconds:", ts:getMilliseconds()) -- Output: 500 | |||
print("Days:", | |||
print("Hours:", | |||
print("Minutes:", | |||
print("Seconds:", | |||
print("Milliseconds:", | |||
-- Get the total number of hours represented by the TimeSpan | -- Get the total number of hours represented by the TimeSpan |
edits