The relative date tokens a dashboard filter offers, with their labels.
The tokens and the dates they cover come from Lotus.Dashboards.DateToken.
This module gives each token a translated label, puts the tokens in groups
for a picker, and formats the dates a token covers on a given day.
Summary
Functions
Formats the dates token covers on today, for example
"Aug 17 – Sep 15, 2026". Returns nil when token is not a token.
Formats a date for a person to read, for example "Sep 15, 2026".
Formats a date range for a person to read. A range in one year shows the year once, and a range of one day shows one date.
Returns the tokens a filter of filter_type accepts, in groups for a picker.
Returns the translated label of token.
Returns the concrete value token resolves to on today for a filter of
filter_type: "YYYY-MM-DD,YYYY-MM-DD" for a range, "YYYY-MM-DD" for a
day.
Returns true when value is a relative date token.
Returns the tokens a filter of filter_type accepts, in picker order.
Functions
Formats the dates token covers on today, for example
"Aug 17 – Sep 15, 2026". Returns nil when token is not a token.
Formats a date for a person to read, for example "Sep 15, 2026".
Formats a date range for a person to read. A range in one year shows the year once, and a range of one day shows one date.
Returns the tokens a filter of filter_type accepts, in groups for a picker.
A :date_range filter accepts every token. A :date filter accepts only
the tokens for one day, as Lotus.Storage.DashboardFilter requires. Other
filter types accept no token.
Returns the translated label of token.
Returns the concrete value token resolves to on today for a filter of
filter_type: "YYYY-MM-DD,YYYY-MM-DD" for a range, "YYYY-MM-DD" for a
day.
Returns true when value is a relative date token.
Returns the tokens a filter of filter_type accepts, in picker order.