import type { ChartDateFormat, ChartDateFormatStyle } from '../types.js'; export type DateSourceFormat = 'mm/yyyy' | 'yyyy-mm' | 'yyyy-mm-dd' | 'dd.mm.yyyy'; export type DateGranularity = 'month' | 'day'; export type DetectedDateSource = { format: DateSourceFormat; granularity: DateGranularity; }; /** * Detect a single shared source date format across all non-empty categories. * Returns `null` if any category fails to match the format picked from the * first non-empty entry. */ export declare function detectDateFormat(categories: string[]): DetectedDateSource | null; export declare function parseDateCategory(value: string, source: DetectedDateSource): Date | null; export declare function defaultStyleFor(granularity: DateGranularity): ChartDateFormatStyle; /** * Format a single category string. Returns the original string if it does not * match the source format, so partially-bad data still renders something. */ export declare function formatDateCategory(value: string, source: DetectedDateSource, format: ChartDateFormat | undefined, locale: string | undefined): string;