Integrate with `MetricsViewTimeRanges` API
To eliminate the risk of inconsistency in how we resolve time range expressions in the backend vs frontend.
@ericpgreen2, can you add more detail here? @mindspank was under the impression that this is related to Pivot Big Number alignment (using big number aggregation API)
No, they're unrelated.
Historically, we've maintained time range resolution logic in the frontend. Going forward, we want to push all our time range resolution logic into the backend– so we have one source-of-truth, one piece of code to maintain. Today, the backend exposes this MetricsViewTimeRanges API which the frontend can use to resolve time range expressions. Today, the API supports our current syntax; hopefully imminently, it'll support our new "Rill Time" syntax.
Once Rill Time feature flag is enabled, this task will be covered. I'm going to mark as a duplicate.