TimeRange
A context representing a period of time. Any user interfaces that represent or visualise events or activity over time can be filtered or focused on a particular time period, e.g.:
- A pricing chart
- A trade blotter
- A record of client contact/activity in a CRM
Example use cases:
- User may want to view pricing/trades/customer activity for a security over a particular time period, the time range might be specified as the context for the
ViewChart
intent OR it might be embedded in another context (e.g. a context representing a chart to plot). - User filters a visualisation (e.g. a pricing chart) to show a particular period, the
TimeRange
is broadcast and other visualisations (e.g. a heatmap of activity by instrument, or industry sector etc.) receive it and filter themselves to show data over the same range.
Notes:
-
A
TimeRange
may be closed (i.e.startTime
andendTime
are both known) or open (i.e. only one ofstartTime
orendTime
is known). -
Ranges corresponding to dates (e.g.
2022-05-12
to2022-05-19
) should be specified using times as this prevents issues with timezone conversions and inclusive/exclusive date ranges. -
String fields representing times are encoded according to ISO 8601-1:2019.
- A timezone indicator should be specified, e.g.
"2022-05-12T15:18:03Z"
or"2022-05-12T16:18:03+01:00"
- Times MAY be specified with millisecond precision, e.g.
"2022-05-12T15:18:03.349Z"
- A timezone indicator should be specified, e.g.
Type
fdc3.timeRange
The fdc3.timeRange
context type is inconsistently used in FDC3 2.0, occasionally appearing as fdc3.timerange
. This has been corrected in FDC3 2.1 to always use the camel-case form fdc3.timeRange
.
Schema
https://fdc3.finos.org/schemas/2.0/timeRange.schema.json
Details
Property | Type | Required | Example Value |
---|---|---|---|
type | string | Yes | "fdc3.timeRange" |
startTime | string * | No ** | "2022-03-30T15:44:44Z" |
endTime | string * | No ** | "2022-04-30T23:59:59+00:00" |
* Fields representing time SHOULD be string encoded according to ISO 8601-1:2019 with a timezone indicator included.
** One of startTime
or endTime
MUST be specified.
Example
A closed range:
const timeRange = {
type: "fdc3.timeRange",
startTime: "2022-03-30T15:44:44Z",
endTime: "2022-04-30T23:59:59ZS"
}
Open ranges:
const timeRange = {
type: "fdc3.timeRange",
startTime: "2022-03-30T15:44:44+00:00"
}
const timeRange = {
type: "fdc3.timeRange",
endTime: "2022-03-30T16:44:44.123Z"
}
See Also
Other Types