yuriy
(Yuriy Kurant)
23.Июнь.2025 13:51:44
26
Мы готовы к слиянию первого PR. Это не идеальный вариант, так как могут последовать исправления краевых случаев, перечисленных в моём предыдущем сообщении .
main ← better-format-dates
merged 03:47AM - 24 Jun 25 UTC
This PR overhauls the way event dates are rendered by applying context-aware for… matting rules:
* Single-day events only show times when appropriate, hiding “12:00 AM” for events without `endDate`.
* Multi-day ranges omit redundant parts (e.g. for the current year) and include weekday/month/day when needed.
### Tests added
* Weekday-only ranges (e.g. “Friday → Monday”)
* Same-week and same-month spans (omitting year)
* Cross-month and cross-year spans (including year where needed)
* `Today/Yesterday/Tomorrow` labels with time ranges
* Same-day events showing only time 
### Impact
* Improves readability of event dates across the app
* Reduces visual noise by hiding redundant date/time fragments
* Ensures consistency with user expectations around relative dates
### Things to clarify
* Relative labels (`Yesterday, Today, Tomorrow`) replace literal dates for nearby days.
* Timezones are only shown when `showLocalTime` is toggled.
### Discussion
https://meta.discourse.org/t/new-calendar-feature-show-local-time/368608/
3 лайка