Fix recurring events from previous years not showing up
Extend recurring event expansion date range from 30 days to 100 years in the past. This ensures yearly recurring events created many years ago (birthdays, anniversaries, historical dates) properly generate their current year occurrences. The backend correctly includes old recurring events that could have occurrences in the requested month, but the frontend was only expanding occurrences within a 30-day historical window, missing events from previous years. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -271,8 +271,8 @@ impl CalendarService {
|
||||
pub fn expand_recurring_events(events: Vec<VEvent>) -> Vec<VEvent> {
|
||||
let mut expanded_events = Vec::new();
|
||||
let today = chrono::Utc::now().date_naive();
|
||||
let start_range = today - Duration::days(30); // Show past 30 days
|
||||
let end_range = today + Duration::days(365); // Show next 365 days
|
||||
let start_range = today - Duration::days(36500); // Show past 100 years (to catch any historical yearly events)
|
||||
let end_range = today + Duration::days(36500); // Show next 100 years
|
||||
|
||||
for event in events {
|
||||
if let Some(ref rrule) = event.rrule {
|
||||
|
||||
Reference in New Issue
Block a user