Inheritance diagram for wx.TimeSpan:
Constructs timespan from separate values for each component, with the date set to 0. Hours are not restricted to 0..24 range, neither are minutes, seconds or milliseconds.
Parameters:
Returns:
Returns the absolute value of the timespan: does not modify the object.
Returns:
Returns the sum of two timespans.
Parameters:
Returns:
Returns the timespan for one day.
Returns:
Returns the timespan for the given number of days.
Parameters:
Returns:
Returns the string containing the formatted representation of the time span.
The following format specifiers are allowed after %:
TimeSpan Format | Description |
---|---|
H | number of Hours |
M | number of Minutes |
S | number of Seconds |
l | number of milliseconds |
D | number of Days |
E | number of wEeks |
% | the percent character |
Parameters:
Returns:
string
Note
Note that, for example, the number of hours in the description above is not well defined: it can be either the total number of hours (for example, for a time span of 50 hours this would be 50) or just the hour part of the time span, which would be 2 in this case as 50 hours is equal to 2 days and 2 hours. wx.TimeSpan resolves this ambiguity in the following way: if there had been, indeed, the %D format specified preceding the %H, then it is interpreted as 2. Otherwise, it is 50. The same applies to all other format specifiers: if they follow a specifier of larger unit, only the rest part is taken, otherwise the full value is used.
Returns the difference in number of days.
Returns:
int
Returns the difference in number of hours.
Returns:
int
Returns the difference in number of milliseconds.
Returns:
int
Returns the difference in number of minutes.
Returns:
int
Returns the difference in number of seconds.
Returns:
int
Returns the difference in number of weeks.
Returns:
int
Returns the timespan for one hour.
Returns:
Returns the timespan for the given number of hours.
Parameters:
Returns:
Returns True if two timespans are equal.
Parameters:
Returns:
bool
Compares two timespans: works with the absolute values, i.e. -2 hours is longer than 1 hour. Also, it will return False if the timespans are equal in absolute value.
Parameters:
Returns:
bool
Returns True if the timespan is negative.
Returns:
bool
Returns True if the timespan is empty.
Returns:
bool
Returns True if the timespan is positive.
Returns:
bool
Compares two timespans: works with the absolute values, i.e. 1 hour is shorter than -2 hours. Also, it will return False if the timespans are equal in absolute value.
Parameters:
Returns:
bool
Returns the timespan for one millisecond.
Returns:
Returns the timespan for the given number of milliseconds.
Parameters:
Returns:
Returns the timespan for one minute.
Returns:
Returns the timespan for the given number of minutes.
Parameters:
Returns:
Multiplies timespan by a scalar.
Parameters:
Returns:
Negate the value of the timespan.
Returns:
Returns the timespan for one second.
Returns:
Returns the timespan for the given number of seconds.
Parameters:
Returns:
Returns the difference of two timespans.
Parameters:
Returns:
Returns the timespan for one week.
Returns:
Returns the timespan for the given number of weeks.
Parameters:
Returns: