Skip to content

fix: honor month helper calendar options#10

Merged
kipcole9 merged 1 commit into
elixir-localize:mainfrom
rubas:fix/month-helper-calendar-options
Apr 25, 2026
Merged

fix: honor month helper calendar options#10
kipcole9 merged 1 commit into
elixir-localize:mainfrom
rubas:fix/month-helper-calendar-options

Conversation

@rubas

@rubas rubas commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Localize.HTML.Month accepted a :calendar option, but month labels were always read from Gregorian calendar data.

This keeps the existing API shape: callers pass an Elixir calendar module, and Calendar.ISO still resolves to Gregorian labels. When a calendar module exposes cldr_calendar_type/0, the helper uses that CLDR calendar for the month labels; otherwise it keeps the existing Gregorian fallback.

The month list behavior is unchanged: :months controls which numbers are rendered.

@rubas rubas force-pushed the fix/month-helper-calendar-options branch 4 times, most recently from 6a3afdf to bfdedaa Compare April 24, 2026 11:22
@rubas rubas force-pushed the fix/month-helper-calendar-options branch from bfdedaa to a0f44e4 Compare April 24, 2026 11:25
@kipcole9 kipcole9 merged commit 6d59e51 into elixir-localize:main Apr 25, 2026
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