Skip to content

add locale support for name specifiers#92

Merged
lestrrat merged 3 commits into
masterfrom
feat-locale
May 21, 2026
Merged

add locale support for name specifiers#92
lestrrat merged 3 commits into
masterfrom
feat-locale

Conversation

@lestrrat

@lestrrat lestrrat commented May 21, 2026

Copy link
Copy Markdown
Collaborator
  • add WithLocale(Locale) to localize name specifiers %A %a %B %b %h %p; numeric specifiers unaffected
  • Locale is an interface built via NewLocale(...) functional options; English default derived from stdlib time, empty entries fall back to English
  • inflected languages (format vs stand-alone month forms) handled by compiling one Strftime per context; a future %OB/%Ob can be added as an optional interface without breaking the API

Note: this ships no actual localizations — the library carries no per-language name data. It provides the escape hatch so users can supply their own names (or implement Locale themselves, backed by a map / computed values / an external dataset).

Closes #64

@lestrrat lestrrat merged commit f89e619 into master May 21, 2026
13 checks passed
@lestrrat lestrrat deleted the feat-locale branch May 21, 2026 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support languages other than English

1 participant