summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/iter.rs4
-rw-r--r--src/iterinfo.rs2
-rw-r--r--src/options.rs1
3 files changed, 4 insertions, 3 deletions
diff --git a/src/iter.rs b/src/iter.rs
index 0581cc3..2673059 100644
--- a/src/iter.rs
+++ b/src/iter.rs
@@ -249,7 +249,9 @@ pub fn increment_counter_date(
counter_date + Duration::days(day_delta as i64)
}
Frequenzy::DAILY => counter_date + Duration::days(options.interval as i64),
- _ => panic!("hfoashfosa"),
+ Frequenzy::HOURLY => counter_date + Duration::hours(options.interval as i64),
+ Frequenzy::MINUTELY => counter_date + Duration::minutes(options.interval as i64),
+ Frequenzy::SECONDLY => counter_date + Duration::seconds(options.interval as i64),
}
}
diff --git a/src/iterinfo.rs b/src/iterinfo.rs
index dbc6e24..083d4fa 100644
--- a/src/iterinfo.rs
+++ b/src/iterinfo.rs
@@ -219,7 +219,7 @@ impl<'a> IterInfo<'a> {
Frequenzy::MONTHLY => self.mdayset(month),
Frequenzy::WEEKLY => self.wdayset(year, month, day),
Frequenzy::DAILY => self.ddayset(year, month, day),
- _ => panic!("Invalid freq"),
+ _ => self.ddayset(year, month, day),
}
}
diff --git a/src/options.rs b/src/options.rs
index 7b2a01e..30143c1 100644
--- a/src/options.rs
+++ b/src/options.rs
@@ -1,4 +1,3 @@
-
use chrono::prelude::*;
#[derive(Debug)]