Date Context
A date-range can be preloaded in the date context using the startDate
and endDate
parameters.
Both fields are optional. When not provided, a default will be provided by the widget, which will vary widget-by-widget.
Each parameter can be passed a number, which will be interpreted as a Unix epoch timestamp.
- This is the preferred way, as it will provide the most consistent results.
- A convenient tool to getting a timestamp is available at unixtime.org.
- Keep in mind that all timestamps operate on the Coordinated Universal Time (UTC) timezone.
- For example, for 10 AM EST 1/19/22 to 10 AM EST 1/20/22, one would provide
?context={ "bus": "red", "startDate": 1642604400000, "endDate": 1642690800000 }
Alternatively, each parameter can also be passed a string, and it will be interpreted by the JavaScript Date.parse() method.
- This should be avoided, as it can produce inconsistent results based on browser + timezone of the user (particularly if an ambiguous string is provided).
- The most consistent approach uses simplified ISO 8601 formatted dates
- For example, for 10 AM EST 1/19/22 to 10 AM EST 1/20/22, one would provide
?context={ "bus": "red", "startDate": "2022-01-19T15:00:00.000Z", "endDate": "2022-01-20T15:00:00.000Z" }
Help Home FTS Apollo™ Help RegLens® Help
Last update:
November 6, 2023