Repository navigation
1.1.5
Summary
- Improves locale/calendar correctness across heatmap rendering.
- Fixes weekday/month inconsistencies for non-default locale/calendar setups.
- Refactors month-grid computation for better testability and reliability.
What changed
- Added locale-aware API inputs to MMHeatmapView (calendar, locale, timeZone).
- Reworked month/week grid logic to respect calendar.firstWeekday.
- Removed hardcoded Sunday-first assumptions from date/grid calculations.
- Added MMHeatmapStyle.localizedWeekSymbols(...) helper for correct weekday label ordering.
- Hardened rendering against edge cases:
- Safe handling for maxValue == 0
- Safe fallback when week labels are invalid length
- Reduced force-unwrap risk in date paths
- Extracted month-grid math into a dedicated utility (MMHeatmapMonthGrid).
- Split preview/playground code into separate preview file.
- Expanded test suite for locale/calendar semantics and grid behavior.
Compatibility
- Backward compatible with existing usage (new parameters are optional).
- Existing consumers can migrate incrementally by passing locale/calendar inputs when needed.
Migration hint
- For locale-correct weekday labels, generate week with:
- MMHeatmapStyle.localizedWeekSymbols(calendar:locale:style:)
- Use the same calendar for both MMHeatmapData creation and MMHeatmapView.