Commit graph

1 commit

Author SHA1 Message Date
06ad5d67d3 feat(quando-5ol): implement format presets and constants
Add Format type with preset constants (ISO, EU, US, Long, RFC2822) and
Format() method for convenient date formatting.

Key features:
- Type-safe Format enum with 5 preset formats
- ISO (2026-02-09), EU (09.02.2026), US (02/09/2026)
- Long format with i18n support (EN: "February 9, 2026", DE: "9. Februar 2026")
- RFC2822 email format
- Language-independent formats (ISO, EU, US, RFC2822) ignore Lang setting
- Language-dependent Long format respects WithLang()

Implementation:
- format.go: Format type, constants, Format() method, formatLong() helper
- format_test.go: 26 tests covering all formats, edge cases, immutability
- example_test.go: 8 example functions demonstrating usage

Performance (exceeds targets):
- ISO/EU/US: ~90 ns (target: <5 µs)
- RFC2822: ~207 ns (target: <5 µs)
- Long EN/DE: ~270 ns (target: <10 µs)

All tests pass with comprehensive coverage of leap years, month boundaries,
and language dependency.
2026-02-11 20:12:00 +01:00