Index
An index that represents as a string a range of time. That range may either be in UTC or local time. UTC is the default.
The actual derived timerange can be found using asRange(). This will return a TimeRange instance.
The original string representation can be found with toString(). A nice version for date based indexes (e.g. 2015-03) can be generated with toNiceString(format) (e.g. March, 2015).
Constructor Summary
Public Constructor | ||
public |
constructor(s: *, utc: *) |
Method Summary
Public Methods | ||
public |
Alias for toString() |
|
public |
Returns the Index as a TimeRange |
|
public |
Returns the start date of the Index |
|
public |
Returns the end date of the Index |
|
public |
Returns the Index as JSON, which will just be its string |
|
public |
toNiceString(format: *): string for the calendar range style Indexes, this lets you return |
|
public |
Simply returns the Index as its string |
Public Constructors
public constructor(s: *, utc: *) source
Params:
Name | Type | Attribute | Description |
s | * | ||
utc | * |
Public Methods
public toJSON(): Object source
Returns the Index as JSON, which will just be its string representation