Closed RobertJoonas closed 1 month ago
In DMs I proposed a new DateTimeRange struct. I did some initial refactoring work for it here https://github.com/plausible/analytics/compare/prepare-for-graph-v2...prepare-for-graph-v2v2?expand=1, give it a look.
It isn't the full solution due to also needing some other flag on Query object to let code know that it should use relative time labels.
Changes
Preparation for migrating the main_graph to API v2.
date
interval today
to be consistent with thetime:*
dimensions in the new API. Docs update in Stats API is pending: https://github.com/plausible/docs/pull/530interval
from themain_graph
controller action. The frontend already decides the interval based on what is valid, and the backend never overrides it - just validates it.date
param in API v2, relative to which the date range will be constructed.Tests
Changelog
Documentation
Dark mode