A structure which represents a time span.
Remarks
This is a convertible type that can be used with the following notation(s) in parameter lists, parameter objects or setters.
There are some string formats that are converted to TimeSpan. For example:
'1s'
'0.5m'
'1h'
'1h 20m'
'1:20'
'1:20:30.5'
It is also possible to use a number which will be interpreted in milliseconds.
Type Details
- yfiles module
- core
- yfiles-umd modules
- All modules
- Legacy UMD name
- yfiles.lang.TimeSpan
See Also
Constructors
Creates a new time span with a given length.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- days - number
- The days part of the time span.
- hours - number
- The hour part of the time span.
- minutes - number
- The minute part of the time span.
- seconds - number
- The seconds part of the time span.
- millis - number
- The milliseconds part of the time span.
Properties
Methods
Compares this object to the given object of the same type.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- obj - Object
- The object to compare this to.
Returns
- ↪number
- -1: this is less than
obj
- 0: this is equal to
obj
- 1: this is greater than
obj
- -1: this is less than
Implements
Constants
Empty time span.
Static Methods
Creates a TimeSpan instance from the given TimeSpan-like object by performing automatic type conversion.