module
time
Time periods as statistics publish them: 2021, 2023-Q1, 2023-M03, 2023-03, 2023-03-15, Mar-2023 and financial years (2022-23), read as decimal years so an axis spaces them truly.
Functions
is_time_name
pub fn is_time_name(key: &str) -> boolWhether a column name says it holds times (so bare years count).
period
pub fn period(s: &str) -> Option<f64>One period as a decimal year. 2010-11 reads as November 2010 here: use periods for a whole column, which can tell financial years.
periods
pub fn periods<'a>(values: impl IntoIterator<Item = &'a str>) -> Vec<Option<f64>>A column of periods. 2010-11, 2011-12 could be months, so they're financial years only when every value in the column could be one.