From f04987a1713fbe180069abd7a7d88043ad62a380 Mon Sep 17 00:00:00 2001 From: Lennart <18233294+lennart-k@users.noreply.github.com> Date: Tue, 10 Jun 2025 18:01:20 +0200 Subject: [PATCH] Remove some garbage code --- crates/ical/src/timestamp.rs | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/crates/ical/src/timestamp.rs b/crates/ical/src/timestamp.rs index 4b1be44..d48cf34 100644 --- a/crates/ical/src/timestamp.rs +++ b/crates/ical/src/timestamp.rs @@ -399,34 +399,6 @@ impl Datelike for CalDateTime { } } -impl CalDateTime { - pub fn inc_year(&self, interval: u32) -> Option { - self.with_year(self.year() + interval as i32) - } - - // Increments the year until a valid date is found - pub fn inc_find_year(&self, interval: u32) -> Self { - let mut year = self.year(); - loop { - year += interval as i32; - if let Some(date) = self.with_year(year) { - return date; - } - } - } - - pub fn inc_month(&self, interval: u32) -> Self { - let mut month0 = self.month0(); - loop { - month0 += interval; - if month0 >= 12 {} - if let Some(date) = self.with_month0(month0) { - return date; - } - } - } -} - #[cfg(test)] mod tests { use crate::CalDateTime;