Skip to content

fix(calendar-agenda): respect user regional date and time formatting preferences - #29

Merged
rathlinus merged 1 commit into
bulwarkmail:mainfrom
tobiasge:fix/calendar-agenda-locale
Oct 28, 2026
Merged

rathlinus merged 1 commit into
bulwarkmail:mainfrom
tobiasge:fix/calendar-agenda-locale

Conversation

@tobiasge

Copy link
Copy Markdown
Contributor

Summary

The calendar-agenda plugin previously formatted times and dates with the browser's native toLocaleTimeString / toLocaleDateString, ignoring the user's regional configuration in webmail (timeFormat 12h/24h, dateLocale override, and effective timeZone). Additionally, untitled event titles were baked in on fetch, causing them not to re-translate when the user switched language.

Changes:

  • Uses api.i18n.formatTime and api.i18n.formatDate (with backwards-compatible fallbacks) so the agenda honors user formatting preferences.
  • Resolves untitled event titles dynamically in render (titleOf) so language changes update untitled events immediately.
  • Unifies BannerAgenda chip labels with titleOf to support dynamic untitled strings and strikethroughs for cancelled events.
  • Bumps calendar-agenda to version 1.4.4 with minAppVersion: 1.18.0.
  • Rebuilds calendar-agenda.zip.
  • Updates test-utils/fake-api.mjs with regional formatting capabilities.
  • Adds test cases for 12h vs 24h clock, dateLocale, and dynamic translation.

Related

…preferences

- Use api.i18n.formatTime and api.i18n.formatDate so the agenda respects the user's 12h/24h time format, date locale, and time zone.
- Resolve untitled event fallback dynamically in render (titleOf) so language switches update untitled event titles immediately.
- Bump calendar-agenda to 1.4.4 and minAppVersion to 1.18.0.
- Update test-utils/fake-api.mjs with regional properties and formatIntl helper.
- Add test coverage for 12h vs 24h clock, dateLocale, and dynamic translation.
@rathlinus
rathlinus merged commit f80e09b into bulwarkmail:main Oct 28, 2026
@rathlinus

Copy link
Copy Markdown
Member

Merged with a fix on top (a1608ea). The agenda groups days by the browser's midnight, but the labels used the zone from the settings. When the two differ, a day heading or an all-day event showed the day before. Labels now use the browser's zone too. I also put minAppVersion back to 1.15.0, since the code falls back on older hosts, and synced the lockfile version.

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