Skip to content

feat(date): locale (#612) - #742

Merged
Keats merged 1 commit into
Keats:nextfrom
ZettaScript:filter-date-locale
Aug 8, 2022
Merged

feat(date): locale (#612)#742
Keats merged 1 commit into
Keats:nextfrom
ZettaScript:filter-date-locale

Conversation

@ZettaScript

Copy link
Copy Markdown
Contributor

Adds optional locale argument in date filter, including doc and tests.

Notes:

  • For some(?) reason, chrono::NaiveDateTime::format_localized does not exist, so timestamps without timezone cannot be localized.
  • In order to avoid code duplication, format_localized is used event when a locale is not provided (using chrono's default POSIX). Looking at chrono's code, this should not affect performance.
  • Adds chrono/unstable-locales, which may be heavy and restrict chrono versions. Should this be in a feature date-locale?

@Keats

Keats commented Aug 7, 2022

Copy link
Copy Markdown
Owner

Should this be in a feature date-locale?

I think so

@ZettaScript

Copy link
Copy Markdown
Contributor Author

I added the non-default date-locale feature.

@Keats
Keats changed the base branch from master to next August 8, 2022 21:19
@Keats
Keats merged commit 8cac2b6 into Keats:next Aug 8, 2022
@ZettaScript
ZettaScript deleted the filter-date-locale branch August 8, 2022 21:35
Keats pushed a commit that referenced this pull request Aug 14, 2022
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.

2 participants