Reference for the Mosaic class Core::TimeSpan
The class Core::TimeSpan is used for date and time operations. Objects of this class can store the time span, convert it and format strings with the time span, etc.
property int32 Days;
The property 'Days' stores the number of whole days within the time span.
method string Format
arg string aFormat
The method Format() converts the stored time span accordingly to the supplied aFormat parameter in a string. The aFormat parameter consists of format codes, preceded by the percent sign '%'. At the runtime the codes are replaced with their corresponding content. All other signs that do not begin with % are simply taken over from aFormat to the output string. Following codes are available:
To remove the leading zeros, the '#' sign may prefix the following format code. For example '%#M' will format the number of minutes as a decimal number in the range 0-59. In contrast to it, '%M' formats the number with the leading zero sign 00-59. If the '#' sign is used together with the format code '%-', no blank is used for positive time span.
property int32 Hours;
The property 'Hours' stores the number of hours within the time span in range 0 .. 23.
method Core::TimeSpan Initialize
arg int32 aTime
The method Initialize() initializes this Core::TimeSpan object with a time span expressed in seconds and returns this object.
method Core::TimeSpan Initialize2
arg int32 aDays,
arg int32 aHours,
arg int32 aMinutes,
arg int32 aSeconds
The method Initialize2() initializes this Core::TimeSpan object with the given parameters and returns this object.
property int32 Minutes;
The property 'Minutes' stores the number of minutes within the time span in range 0 .. 59.
property int32 Seconds;
The property 'Seconds' stores the number of seconds within the time span in range of 0 .. 59.
property string String;
The property 'String' stores the time span as a string [-][d.]hh:mm:ss. Items in brackets are optional. This property is read only - it is not possible to assign a value to it.
property int32 Time;
The property 'Time' stores the total number of seconds of this time span.
property int32 TotalHours;
The property 'TotalHours' stores the total number of whole hours within the time span.
property int32 TotalMinutes;
The property 'TotalMinutes' stores the number of whole minutes within the time span.