Skip to content

Fix stand-alone pattern helpers passing wrong option to Calendar.localize#20

Merged
kipcole9 merged 1 commit into
elixir-localize:mainfrom
timpritlove:fix/formatter-pass-context-to-calendar-localize
Apr 28, 2026
Merged

Fix stand-alone pattern helpers passing wrong option to Calendar.localize#20
kipcole9 merged 1 commit into
elixir-localize:mainfrom
timpritlove:fix/formatter-pass-context-to-calendar-localize

Conversation

@timpritlove
Copy link
Copy Markdown
Contributor

I noticed a bug in how (at least) german weekday names were formatted getting a "Sa." instead of "Sa" for "Samstag" (so with an added period). Looks like this fixes this:

standalone_day_of_week/4, standalone_month/4, and standalone_quarter/4 called Localize.Calendar.localize/3 with type: :stand_alone, but the public API expects context: (default :format). Unknown keywords were ignored, so lowercase LDML pattern letters c, L, and q resolved format-context data instead of stand-alone data.

Disclaimer: an AI agent used to track this down.

…lize

standalone_day_of_week/4, standalone_month/4, and standalone_quarter/4
called Localize.Calendar.localize/3 with type: :stand_alone, but the public API
expects :context (default :format). Unknown keywords were ignored, so
lowercase LDML letters c, L, q resolved format-context data instead of
stand-alone data.

Made-with: Cursor
@kipcole9 kipcole9 merged commit a61d6f2 into elixir-localize:main Apr 28, 2026
@kipcole9
Copy link
Copy Markdown
Contributor

Thanks much, good PR and greatfully accepted. Will publish an update in an hour or so. I'm review to library to see if there are any other similar issues.

@kipcole9
Copy link
Copy Markdown
Contributor

I've published [localize version 0.24.0}(https://hex.pm/packages/localize/0.24.0) with the following changelog entry:

[0.24.0] — April 29th, 2026

Bug Fixes

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