Files
sure/app
Mark Hendriksen 0497b1d7c1 Use date comparisons for interval thresholds (#1923)
* Use date comparisons for interval thresholds

Replace hard-coded day counts in Period#interval with direct date comparisons (end_date > start_date + 5.years and + 1.year) for clearer intent and to avoid magic numbers; updated inline comments. No behavioral change intended aside from improved readability.

* Use advance(years:) for year-based comparisons

Replace start_date + N.years with start_date.advance(years: N) to apply calendar-year semantics (respecting leap years/month boundaries). Update comments to clarify 'calendar years' and the resulting interval choices (monthly for >5 years, weekly for >1 year). Intent is to make the period interval calculation more correct for calendar-aware date comparisons.
2026-05-23 09:41:57 +02:00
..
2026-03-25 10:50:23 +01:00