Skip to content

Add locale option to date/time/datetime formatters #1053

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 51 commits into from
Sep 13, 2022
Merged

Conversation

rich-iannone
Copy link
Member

@rich-iannone rich-iannone commented Sep 9, 2022

The changes here make it possible to localize dates/times/datetimes with the locale argument in fmt_date(), fmt_time(), and fmt_datetime() (also in the vec_fmt_*() variants). This also extends the format argument to accept CLDR formatting patterns (much more powerful and flexible than the strptime() patterns). The package autodetects the pattern type given in format. Adds flexible date and time formats that are locale-aware.

Fixes: #531
Fixes: #1052

@rich-iannone rich-iannone marked this pull request as ready for review September 13, 2022 17:11
@cscheid cscheid merged commit b3f165a into master Sep 13, 2022
@rich-iannone rich-iannone deleted the dt-localize branch September 13, 2022 17:43
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.

Feature request: year.quarter option for date_style in fmt_date() Create human-readable style identifiers
2 participants