Skip to content

1.1.5

Choose a tag to compare

@aalpercem aalpercem released this 15 Feb 20:53
· 1 commit to main since this release

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.