Skip to main content

Module format

Module format 

Source

Structs§

DateFormatter
NumberFormatter
d3-format compatible number formatter.

Functions§

detect_date_format
Detect if labels look like dates and return a compact display format. Checks a sample of labels for ISO date patterns (YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS). Returns a chrono strftime format string for compact display, or the special QUARTER_FORMAT marker when all dates are quarter boundaries.
reformat_date_label
Reformat a date label using the given strftime format string. If format_str is the special QUARTER_FORMAT marker, formats as “Q1 ’23” etc. If the label cannot be parsed as a date, returns it unchanged.