- Fix RRULE BYDAY filtering for daily frequency events (Tether sync weekdays only) - Fix timezone transfer in recurring event expansion - Add comprehensive timezone-aware iCal generation - Add extensive test suite for recurrence and timezone functionality - Update dependencies and configuration examples - Implement cleanup logic for orphaned events - Add detailed import plan documentation This completes the core import functionality with proper timezone handling, RRULE parsing, and duplicate prevention mechanisms.
31 lines
931 B
Rust
31 lines
931 B
Rust
use rrule::{RRuleSet};
|
|
use chrono::{DateTime, Utc};
|
|
|
|
fn main() {
|
|
let rrule_str = "FREQ=WEEKLY;BYDAY=MO,WE,FR;COUNT=10";
|
|
println!("Testing RRULE: {}", rrule_str);
|
|
|
|
// Test different approaches
|
|
match RRuleSet::from_str(rrule_str) {
|
|
Ok(rrule_set) => {
|
|
println!("Successfully parsed RRULE");
|
|
|
|
// Check available methods
|
|
let start = Utc::now();
|
|
let end = start + chrono::Duration::days(30);
|
|
|
|
// Try the between method
|
|
match rrule_set.between(start, end, true) {
|
|
Ok(occurrences) => {
|
|
println!("Found {} occurrences", occurrences.len());
|
|
}
|
|
Err(e) => {
|
|
println!("Error calling between: {}", e);
|
|
}
|
|
}
|
|
}
|
|
Err(e) => {
|
|
println!("Error parsing RRULE: {}", e);
|
|
}
|
|
}
|
|
}
|