Fix stand-alone pattern helpers passing wrong option to Calendar.localize#20
Merged
kipcole9 merged 1 commit intoApr 28, 2026
Conversation
…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
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. |
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, 2026Bug Fixes
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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, andstandalone_quarter/4calledLocalize.Calendar.localize/3withtype: :stand_alone, but the public API expectscontext:(default:format). Unknown keywords were ignored, so lowercase LDML pattern lettersc,L, andqresolved format-context data instead of stand-alone data.Disclaimer: an AI agent used to track this down.