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 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.