TimeRanges
Objects implementing the TimeRanges interface represent a list of
ranges (periods) of time.
When a TimeRanges object is said to be a normalized TimeRanges
object, the ranges it represents must obey the following criteria:
The start of a range must be greater than the end of all earlier ranges.
The start of a range must be less than the end of that same range.
In other words, the ranges in such an object are ordered, don't
overlap, aren't empty, and don't touch (adjacent ranges are folded
into one bigger range).
Supported Platform(s)
- BlackBerry OS 6.0+ |
- BlackBerry PlayBook 1.0+ |
- BlackBerry 10 |
- Ripple Emulator |
Configuration Document Settings
To use all of the API described for this object, you must ensure the following settings are in your configuration document: |
This API does not require a <feature> element to be declared in the configuration document of your BlackBerry WebWorks Application. |
Permission Elements (PlayBook and BlackBerry 10+) |
---|
This API does not require a <permission> element to be declared in the configuration document of your BlackBerry WebWorks Application. |
Functions
Number
end
(index : Number)
Returns the position of the end of the indexth range represented by the object, in seconds measured from the start of the timeline that the object covers
Supported Platforms | |
---|---|
- BlackBerry OS 6.0+ | |
- BlackBerry PlayBook 1.0+ | |
- BlackBerry 10 | |
- Ripple Emulator |
Parameters | |
---|---|
index | Indexth range represented by the object |
Return:
Returns the time for the end of the range with the given index.
Number
start
(index : Number)
Return the position of the start of the indexth range represented by the object, in seconds measured from the start of the timeline that the object covers
Supported Platforms | |
---|---|
- BlackBerry OS 6.0+ | |
- BlackBerry PlayBook 1.0+ | |
- BlackBerry 10 | |
- Ripple Emulator |
Parameters | |
---|---|
index | Indexth range represented by the object |
Return:
Returns the time for the start of the range with the given index.