# Supported Formats

> Auto-generated by `cargo test -- --ignored dump_formats`.
> Do not edit by hand — re-run that command to regenerate.

## Date patterns

Datetime formats are detected **compositionally**: date + separator (`T` or space) + time + optional timezone. Any valid combination is recognised automatically. Date-only values (no time component) are also detected for all date patterns.

| Name | Example | Polars fragment |
| ---- | ------- | --------------- |
| ISO 8601 | `2024-01-15` | `%Y-%m-%d` |
| EU slash, 4-digit year | `15/01/2024` | `%d/%m/%Y` |
| US slash, 4-digit year | `01/15/2024` | `%m/%d/%Y` |
| EU slash, 2-digit year | `15/01/24` | `%d/%m/%y` |
| US slash, 2-digit year | `01/15/24` | `%m/%d/%y` |
| EU dot, 4-digit year | `15.01.2024` | `%d.%m.%Y` |
| EU dot, 2-digit year | `15.01.24` | `%d.%m.%y` |
| Compact | `20240115` | `%Y%m%d` |
| Month-name US, 4-digit year | `Jan 15, 2024` | `%b %d, %Y` |
| Month-name US, 2-digit year | `Jan 15, 24` | `%b %d, %y` |
| Month-name EU, 4-digit year | `15 Jan 2024` | `%d %b %Y` |
| Month-name EU, 2-digit year | `15 Jan 24` | `%d %b %y` |
| RFC 2822 | `Mon, 15 Jan 2024` | `%a, %d %b %Y` |

2-digit years are expanded using the POSIX convention: 00–68 → 2000–2068, 69–99 → 1969–1999.

## Time patterns

| Name | Example | Polars fragment |
| ---- | ------- | --------------- |
| 24-hour | `10:30:00` | `%H:%M:%S` |
| 24-hour + fractional seconds | `10:30:00.123456` | `%H:%M:%S%.f` |
| 24-hour compact | `103000` | `%H%M%S` |
| 12-hour AM/PM | `10:30:00 PM` | `%I:%M:%S %p` |
| 12-hour AM/PM compact | `10:30:00PM` | `%I:%M:%S%p` |

Date and time are joined by `T` (ISO 8601 style) or a single space.

## Timezone suffixes (optional)

| Name | Example | Polars fragment |
| ---- | ------- | --------------- |
| UTC | `Z` | `Z` |
| Offset with colon | `+05:30` | `%:z` |
| Compact offset | `+0530` | `%z` |

A space before the timezone suffix is also accepted (e.g. `10:30:00 +05:30`).

## Unix epoch formats

`infer_format` returns a `@`-prefixed marker for epoch columns. Apply them via integer casting — see the README for details.

| Name | Example | Marker |
| ---- | ------- | ------ |
| Unix Seconds | `1705314600` | `@unix_seconds` |
| Unix Milliseconds | `1705314600000` | `@unix_ms` |
| Unix Microseconds | `1705314600000000` | `@unix_us` |
| Unix Nanoseconds | `1705314600000000000` | `@unix_ns` |

## Unix epoch digit-count ranges

Unix formats use non-overlapping digit-count windows so the inference engine can discriminate between units without ambiguity:

| Variant | Digit count | Approx. date range |
| ------- | ----------- | ------------------ |
| Unix Seconds | 9–10 | 1973-03-03 … 2286-11-20 |
| Unix Milliseconds | 11–13 | 1970 … 2286 (ms) |
| Unix Microseconds | 14–16 | 1970 … 2286 (µs) |
| Unix Nanoseconds | 17–19 | 1677 … 2262 (ns, i64) |

Values with 1–8 digits do not match any Unix variant; 8-digit numeric strings are handled exclusively by the compact date format (if they form a valid date).
