Product Site

5.4.24.10. init

Initializes a new TimeSpan instance. If the single fulldate argument is used, the TimeSpan argument is initialized to the time span fulldate microseconds. Otherwise, the TimeSpan instance is initialized to either the hours, minutes, and seconds or the days, hours, minutes, seconds, and microseconds components. Each of these components must be a valid whole number within the acceptable range for the given component. For example, hours must be in the range 0-23, while minutes must be in the range 0-59.
Example 5.320. TimeSpan class
span = .TimeSpan~new(time('F', "15:37:30", "N"))  -- 15:37:30.000000
span = .TimeSpan~new(15, 37, 30)                  -- 15:37:30.000000
span = .TimeSpan~new(6, 4, 33, 15, 100)           -- 6.04:33:15.000100