diff options
-rw-r--r-- | README.md | 23 | ||||
-rw-r--r-- | src/iter.rs | 36 | ||||
-rw-r--r-- | src/iter_set.rs | 6 | ||||
-rw-r--r-- | src/iterinfo.rs | 14 | ||||
-rw-r--r-- | src/monthinfo.rs | 4 | ||||
-rw-r--r-- | src/options.rs | 14 | ||||
-rw-r--r-- | src/parse_options.rs | 16 | ||||
-rw-r--r-- | src/rrule.rs | 35 | ||||
-rw-r--r-- | src/rruleset.rs | 52 | ||||
-rw-r--r-- | src/rrulestr.rs | 40 | ||||
-rw-r--r-- | tests/rrule.rs | 310 |
11 files changed, 321 insertions, 229 deletions
@@ -1,12 +1,31 @@ -# RRule implemented in Rust for speed +# RRule in rust + [![Build](https://travis-ci.com/fmeringdal/rust_rrule.svg?branch=main)](https://travis-ci.com/fmeringdal/rust_rrule) [![codecov](https://codecov.io/gh/fmeringdal/rust_rrule/branch/main/graph/badge.svg)](https://codecov.io/gh/fmeringdal/rust_rrule) [![crates.io](https://img.shields.io/crates/v/rrule.svg)](https://crates.io/crates/rrule) -Fast implementation of rrule +A pure Rust partial implementation of recurrence rules as defined in the iCalendar RFC. + +# Usage + +```rust +extern crate rrule; + +use rrule::build_rrule; +let mut rrule_set = build_rule("RRULE:UNTIL=19990404T110000Z;DTSTART;TZID=America/New_York:19990104T110000Z;FREQ=WEEKLY;BYDAY=TU,WE"); + +// Get all occurrences of the rrule set +let occurences = rrule_set.all(); +``` + +# Inspired by + +- [python-dateutil library](http://labix.org/python-dateutil/) +- [rrule.js](https://github.com/jakubroztocil/rrule) # todos + - tests for minutes and seconds FREQ - timezone - subseconds diff --git a/src/iter.rs b/src/iter.rs index 5a3da4d..72c0c0a 100644 --- a/src/iter.rs +++ b/src/iter.rs @@ -103,10 +103,10 @@ pub fn increment_counter_date( filtered: bool, ) -> DateTime<Utc> { match options.freq { - Frequenzy::YEARLY => counter_date + Frequenzy::Yearly => counter_date .with_year(counter_date.year() + options.interval as i32) .unwrap(), - Frequenzy::MONTHLY => { + Frequenzy::Monthly => { let new_month = counter_date.month() + options.interval as u32; if new_month > 12 { let mut year_div = new_month / 12; @@ -125,7 +125,7 @@ pub fn increment_counter_date( counter_date.with_month(new_month).unwrap() } } - Frequenzy::WEEKLY => { + Frequenzy::Weekly => { let mut day_delta = 0; let weekday = get_weekday_val(&counter_date.weekday()); if options.wkst > weekday { @@ -136,8 +136,8 @@ pub fn increment_counter_date( } counter_date + Duration::days(day_delta as i64) } - Frequenzy::DAILY => counter_date + Duration::days(options.interval as i64), - Frequenzy::HOURLY => { + Frequenzy::Daily => counter_date + Duration::days(options.interval as i64), + Frequenzy::Hourly => { let mut new_hours = counter_date.hour() as usize; if filtered { new_hours += ((23 - new_hours) as f32 / options.interval as f32).floor() as usize @@ -157,8 +157,8 @@ pub fn increment_counter_date( } counter_date.with_hour(0).unwrap() + Duration::hours(new_hours as i64) } - Frequenzy::MINUTELY => counter_date + Duration::minutes(options.interval as i64), - Frequenzy::SECONDLY => counter_date + Duration::seconds(options.interval as i64), + Frequenzy::Minutely => counter_date + Duration::minutes(options.interval as i64), + Frequenzy::Secondly => counter_date + Duration::seconds(options.interval as i64), } } @@ -232,10 +232,10 @@ pub fn remove_filtered_days( pub fn build_timeset(options: &ParsedOptions) -> Vec<Time> { let millisecond_mod = (options.dtstart.timestamp_millis() & 1000) as usize; - if !(options.freq == Frequenzy::DAILY - || options.freq == Frequenzy::MONTHLY - || options.freq == Frequenzy::WEEKLY - || options.freq == Frequenzy::YEARLY) + if !(options.freq == Frequenzy::Daily + || options.freq == Frequenzy::Monthly + || options.freq == Frequenzy::Weekly + || options.freq == Frequenzy::Yearly) { return vec![]; } @@ -257,27 +257,27 @@ pub fn make_timeset( counter_date: &DateTime<Utc>, options: &ParsedOptions, ) -> Vec<Time> { - if options.freq == Frequenzy::DAILY - || options.freq == Frequenzy::MONTHLY - || options.freq == Frequenzy::WEEKLY - || options.freq == Frequenzy::YEARLY + if options.freq == Frequenzy::Daily + || options.freq == Frequenzy::Monthly + || options.freq == Frequenzy::Weekly + || options.freq == Frequenzy::Yearly { return build_timeset(options); } - if (options.freq >= Frequenzy::HOURLY + if (options.freq >= Frequenzy::Hourly && !options.byhour.is_empty() && !options .byhour .iter() .any(|&h| h == counter_date.hour() as usize)) - || (options.freq >= Frequenzy::MINUTELY + || (options.freq >= Frequenzy::Minutely && !options.byminute.is_empty() && !options .byminute .iter() .any(|&m| m == counter_date.minute() as usize)) - || (options.freq >= Frequenzy::SECONDLY + || (options.freq >= Frequenzy::Secondly && !options.bysecond.is_empty() && !options .bysecond diff --git a/src/iter_set.rs b/src/iter_set.rs index 077154b..e3c37db 100644 --- a/src/iter_set.rs +++ b/src/iter_set.rs @@ -119,9 +119,9 @@ pub fn iter_v2<T: IterResult>( return iter_result.get_value(); } - if options.freq == Frequenzy::HOURLY - || options.freq == Frequenzy::MINUTELY - || options.freq == Frequenzy::SECONDLY + if options.freq == Frequenzy::Hourly + || options.freq == Frequenzy::Minutely + || options.freq == Frequenzy::Secondly { timeset = ii.gettimeset( &options.freq, diff --git a/src/iterinfo.rs b/src/iterinfo.rs index c0285f6..6f3044e 100644 --- a/src/iterinfo.rs +++ b/src/iterinfo.rs @@ -229,10 +229,10 @@ impl<'a> IterInfo<'a> { day: usize, ) -> (Vec<usize>, usize, usize) { match freq { - Frequenzy::YEARLY => self.ydayset(), - Frequenzy::MONTHLY => self.mdayset(month), - Frequenzy::WEEKLY => self.wdayset(year, month, day), - Frequenzy::DAILY => self.ddayset(year, month, day), + Frequenzy::Yearly => self.ydayset(), + Frequenzy::Monthly => self.mdayset(month), + Frequenzy::Weekly => self.wdayset(year, month, day), + Frequenzy::Daily => self.ddayset(year, month, day), _ => self.ddayset(year, month, day), } } @@ -246,9 +246,9 @@ impl<'a> IterInfo<'a> { millisecond: usize, ) -> Vec<Time> { match freq { - Frequenzy::HOURLY => self.htimeset(hour, minute, second, millisecond), - Frequenzy::MINUTELY => self.mtimeset(hour, minute, second, millisecond), - Frequenzy::SECONDLY => self.stimeset(hour, minute, second, millisecond), + Frequenzy::Hourly => self.htimeset(hour, minute, second, millisecond), + Frequenzy::Minutely => self.mtimeset(hour, minute, second, millisecond), + Frequenzy::Secondly => self.stimeset(hour, minute, second, millisecond), _ => panic!("Invalid freq"), } } diff --git a/src/monthinfo.rs b/src/monthinfo.rs index 8ccda94..c0af98a 100644 --- a/src/monthinfo.rs +++ b/src/monthinfo.rs @@ -23,7 +23,7 @@ pub fn rebuild_month( }; let mut ranges: Vec<(isize, isize)> = vec![]; - if options.freq == Frequenzy::YEARLY { + if options.freq == Frequenzy::Yearly { if options.bymonth.is_empty() { ranges = vec![(0, yearlen as isize)]; } else { @@ -32,7 +32,7 @@ pub fn rebuild_month( ranges.push((mrange[m - 1] as isize, mrange[m] as isize)) } } - } else if options.freq == Frequenzy::MONTHLY { + } else if options.freq == Frequenzy::Monthly { ranges.push((mrange[month - 1] as isize, mrange[month] as isize)); } diff --git a/src/options.rs b/src/options.rs index 67c779e..a6736a8 100644 --- a/src/options.rs +++ b/src/options.rs @@ -16,13 +16,13 @@ pub struct YearInfo { #[derive(Debug, PartialEq, PartialOrd, Clone)] pub enum Frequenzy { - YEARLY = 0, - MONTHLY = 1, - WEEKLY = 2, - DAILY = 3, - HOURLY = 4, - MINUTELY = 5, - SECONDLY = 6, + Yearly = 0, + Monthly = 1, + Weekly = 2, + Daily = 3, + Hourly = 4, + Minutely = 5, + Secondly = 6, } #[derive(Debug, Clone)] diff --git a/src/parse_options.rs b/src/parse_options.rs index e9cffc3..86c3f94 100644 --- a/src/parse_options.rs +++ b/src/parse_options.rs @@ -6,13 +6,13 @@ use crate::options::{ParsedOptions, Frequenzy}; pub fn parse_options(options: &PartialOptions) -> ParsedOptions { let mut default_partial_options = PartialOptions::new(); default_partial_options.interval = Some(1); - default_partial_options.freq = Some(Frequenzy::YEARLY); + default_partial_options.freq = Some(Frequenzy::Yearly); default_partial_options.wkst = Some(0); let mut partial_options = PartialOptions::concat(&default_partial_options, options); if partial_options.byeaster.is_some() { - partial_options.freq = Some(Frequenzy::YEARLY); + partial_options.freq = Some(Frequenzy::Yearly); } let freq = partial_options.freq.unwrap(); @@ -43,16 +43,16 @@ pub fn parse_options(options: &PartialOptions) -> ParsedOptions { partial_options.byeaster.is_some() ) { match &freq { - Frequenzy::YEARLY => { + Frequenzy::Yearly => { if let Some(bymonth) = partial_options.bymonth { partial_options.bymonth = Some(vec![partial_options.dtstart.unwrap().month() as usize]); } partial_options.bymonthday = Some(vec![partial_options.dtstart.unwrap().day() as isize]); }, - Frequenzy::MONTHLY => { + Frequenzy::Monthly => { partial_options.bymonthday = Some(vec![partial_options.dtstart.unwrap().day() as isize]); }, - Frequenzy::WEEKLY => { + Frequenzy::Weekly => { partial_options.byweekday = Some(vec![partial_options.dtstart.unwrap().weekday() as usize]); }, _ => unreachable!("Shouldnt be reached") @@ -83,18 +83,18 @@ pub fn parse_options(options: &PartialOptions) -> ParsedOptions { } // byhour - if partial_options.byhour.is_none() && freq < Frequenzy::HOURLY { + if partial_options.byhour.is_none() && freq < Frequenzy::Hourly { partial_options.byhour = Some(vec![partial_options.dtstart.unwrap().hour() as usize]); } // byminute - if partial_options.byminute.is_none() && freq < Frequenzy::MINUTELY { + if partial_options.byminute.is_none() && freq < Frequenzy::Minutely { partial_options.byminute = Some(vec![partial_options.dtstart.unwrap().minute() as usize]); } // bysecond - if partial_options.bysecond.is_none() && freq < Frequenzy::SECONDLY { + if partial_options.bysecond.is_none() && freq < Frequenzy::Secondly { partial_options.bysecond = Some(vec![partial_options.dtstart.unwrap().second() as usize]); } diff --git a/src/rrule.rs b/src/rrule.rs index 4b4e6c5..b7f53ea 100644 --- a/src/rrule.rs +++ b/src/rrule.rs @@ -4,24 +4,45 @@ use crate::options::*; use chrono::prelude::*; use chrono_tz::{Tz, UTC}; + +/// A type that produces instances of a given a RFC1241 string representation. +/// +/// The first element is traditionally the path of the executable, but it can be +/// set to arbitrary text, and may not even exist. This means this property should +/// not be relied upon for security purposes. +/// +/// On Unix systems shell usually expands unquoted arguments with glob patterns +/// (such as `*` and `?`). On Windows this is not done, and such arguments are +/// passed as-is. +/// +/// # Panics +/// +/// The returned iterator will panic during iteration if any argument to the +/// process is not valid unicode. If this is not desired, +/// use the [`args_os`] function instead. +/// +/// # Examples +/// +/// ``` +/// use std::env; +/// +/// // Prints each argument on a separate line +/// for argument in env::args() { +/// println!("{}", argument); +/// } +/// ``` #[derive(Clone, Debug)] pub struct RRule { - cache: bool, pub options: ParsedOptions, } impl RRule { pub fn new(options: ParsedOptions) -> Self { Self { - options, - cache: true, + options } } - pub fn disable_cache(&mut self) { - self.cache = false; - } - pub fn all(&mut self) -> Vec<DateTime<Tz>> { let iter_args = IterArgs { inc: true, diff --git a/src/rruleset.rs b/src/rruleset.rs index 29093ae..c6a4356 100644 --- a/src/rruleset.rs +++ b/src/rruleset.rs @@ -6,6 +6,32 @@ use chrono::prelude::*; use chrono_tz::{Tz, UTC}; use std::collections::HashMap; +/// A type that produces instances of a given a RFC1241 string representation. +/// +/// The first element is traditionally the path of the executable, but it can be +/// set to arbitrary text, and may not even exist. This means this property should +/// not be relied upon for security purposes. +/// +/// On Unix systems shell usually expands unquoted arguments with glob patterns +/// (such as `*` and `?`). On Windows this is not done, and such arguments are +/// passed as-is. +/// +/// # Panics +/// +/// The returned iterator will panic during iteration if any argument to the +/// process is not valid unicode. If this is not desired, +/// use the [`args_os`] function instead. +/// +/// # Examples +/// +/// ``` +/// use std::env; +/// +/// // Prints each argument on a separate line +/// for argument in env::args() { +/// println!("{}", argument); +/// } +/// ``` #[derive(Debug)] pub struct RRuleSet { rrule: Vec<RRule>, @@ -315,7 +341,7 @@ mod test_iter_set { let mut set = RRuleSet::new(); let options1 = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(6), bymonth: vec![], dtstart: Utc.ymd(1997, 9, 2).and_hms(9, 0, 0), @@ -338,7 +364,7 @@ mod test_iter_set { let rrule = RRule::new(options1); set.rrule(rrule); let options2 = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(3), bymonth: vec![], dtstart: Utc.ymd(1997, 9, 2).and_hms(9, 0, 0), @@ -408,7 +434,7 @@ mod test_iter_set { set.rdate(ymd_hms(1997, 9, 18, 9, 0, 0)); let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(3), bymonth: vec![], dtstart: Utc.ymd(1997, 9, 2).and_hms(9, 0, 0), @@ -446,7 +472,7 @@ mod test_iter_set { let mut set = RRuleSet::new(); let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(6), bymonth: vec![], dtstart: Utc.ymd(1997, 9, 2).and_hms(9, 0, 0), @@ -488,7 +514,7 @@ mod test_iter_set { let mut set = RRuleSet::new(); let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(13), bymonth: vec![9], dtstart: Utc.ymd(1997, 9, 2).and_hms(9, 0, 0), @@ -512,7 +538,7 @@ mod test_iter_set { set.rrule(rrule); let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(10), bymonth: vec![9], dtstart: Utc.ymd(1997, 9, 2).and_hms(9, 0, 0), @@ -550,7 +576,7 @@ mod test_iter_set { let mut set = RRuleSet::new(); let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: None, bymonth: vec![9], dtstart: Utc.ymd(1997, 9, 2).and_hms(9, 0, 0), @@ -574,7 +600,7 @@ mod test_iter_set { set.rrule(rrule); let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(10), bymonth: vec![9], dtstart: Utc.ymd(1997, 9, 2).and_hms(9, 0, 0), @@ -608,7 +634,7 @@ mod test_iter_set { let mut set = RRuleSet::new(); let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: None, bymonth: vec![9], dtstart: Utc.ymd(1997, 9, 2).and_hms(9, 0, 0), @@ -632,7 +658,7 @@ mod test_iter_set { set.rrule(rrule); let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(10), bymonth: vec![9], dtstart: Utc.ymd(1997, 9, 2).and_hms(9, 0, 0), @@ -666,7 +692,7 @@ mod test_iter_set { let mut set = RRuleSet::new(); let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: None, bymonth: vec![9], dtstart: Utc.ymd(1997, 9, 2).and_hms(9, 0, 0), @@ -690,7 +716,7 @@ mod test_iter_set { set.rrule(rrule); let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(10), bymonth: vec![9], dtstart: Utc.ymd(1997, 9, 2).and_hms(9, 0, 0), @@ -732,7 +758,7 @@ mod test_iter_set { let mut set = RRuleSet::new(); let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(2), bymonth: vec![1], dtstart: Utc.ymd(1960, 1, 1).and_hms(9, 0, 0), diff --git a/src/rrulestr.rs b/src/rrulestr.rs index 5df7fd7..996749d 100644 --- a/src/rrulestr.rs +++ b/src/rrulestr.rs @@ -132,13 +132,13 @@ fn parse_dtstart(s: &str) -> Option<PartialOptions> { fn from_str_to_freq(s: &str) -> Option<Frequenzy> { match s.to_uppercase().as_str() { - "YEARLY" => Some(Frequenzy::YEARLY), - "MONTHLY" => Some(Frequenzy::MONTHLY), - "WEEKLY" => Some(Frequenzy::WEEKLY), - "DAILY" => Some(Frequenzy::DAILY), - "HOURLY" => Some(Frequenzy::HOURLY), - "MINUTELY" => Some(Frequenzy::MINUTELY), - "SECONDLY" => Some(Frequenzy::SECONDLY), + "YEARLY" => Some(Frequenzy::Yearly), + "MONTHLY" => Some(Frequenzy::Monthly), + "WEEKLY" => Some(Frequenzy::Weekly), + "DAILY" => Some(Frequenzy::Daily), + "HOURLY" => Some(Frequenzy::Hourly), + "MINUTELY" => Some(Frequenzy::Minutely), + "SECONDLY" => Some(Frequenzy::Secondly), _ => None, } } @@ -433,6 +433,32 @@ fn parse_rdate(rdateval: &str, params: Vec<String>) -> Vec<DateTime<Utc>> { rdateval.split(",").map(|datestr| datestring_to_date(datestr)).collect() } +/// A type that produces instances of a given a RFC1241 string representation. +/// +/// The first element is traditionally the path of the executable, but it can be +/// set to arbitrary text, and may not even exist. This means this property should +/// not be relied upon for security purposes. +/// +/// On Unix systems shell usually expands unquoted arguments with glob patterns +/// (such as `*` and `?`). On Windows this is not done, and such arguments are +/// passed as-is. +/// +/// # Panics +/// +/// The returned iterator will panic during iteration if any argument to the +/// process is not valid unicode. If this is not desired, +/// use the [`args_os`] function instead. +/// +/// # Examples +/// +/// ``` +/// use std::env; +/// +/// // Prints each argument on a separate line +/// for argument in env::args() { +/// println!("{}", argument); +/// } +/// ``` pub fn build_rule(s: &str) -> RRuleSet { let ParsedInput { mut rrule_vals, diff --git a/tests/rrule.rs b/tests/rrule.rs index 764c987..e23b270 100644 --- a/tests/rrule.rs +++ b/tests/rrule.rs @@ -41,7 +41,7 @@ mod test { #[test] fn yearly() { let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(3), bymonth: vec![9], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -74,7 +74,7 @@ mod test { #[test] fn yearly_interval() { let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(3), bymonth: vec![9], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -107,7 +107,7 @@ mod test { #[test] fn yearly_interval_large() { let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(3), bymonth: vec![9], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -140,7 +140,7 @@ mod test { #[test] fn yearly_by_easter() { let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -173,7 +173,7 @@ mod test { #[test] fn yearly_by_easterpos() { let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -206,7 +206,7 @@ mod test { #[test] fn yearly_by_easterpos_neg() { let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -239,7 +239,7 @@ mod test { #[test] fn yearly_by_month() { let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(3), bymonth: vec![1, 3], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -272,7 +272,7 @@ mod test { #[test] fn yearly_by_monthday() { let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -305,7 +305,7 @@ mod test { #[test] fn yearly_by_month_and_monthday() { let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(3), bymonth: vec![1, 3], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -338,7 +338,7 @@ mod test { #[test] fn yearly_by_weekday() { let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -371,7 +371,7 @@ mod test { #[test] fn yearly_by_nweekday() { let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -404,7 +404,7 @@ mod test { #[test] fn yearly_by_nweekday_large() { let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -437,7 +437,7 @@ mod test { #[test] fn yearly_by_month_and_weekday() { let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(3), bymonth: vec![1, 3], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -470,7 +470,7 @@ mod test { #[test] fn yearly_by_month_and_nweekday() { let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(3), bymonth: vec![1, 3], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -503,7 +503,7 @@ mod test { #[test] fn yearly_by_month_and_nweekday_large() { let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(3), bymonth: vec![1, 3], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -536,7 +536,7 @@ mod test { #[test] fn yearly_by_monthday_and_weekday() { let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -569,7 +569,7 @@ mod test { #[test] fn yearly_by_month_and_monthday_and_weekday() { let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(3), bymonth: vec![1, 3], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -602,7 +602,7 @@ mod test { #[test] fn yearly_by_yearday() { let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(4), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -636,7 +636,7 @@ mod test { #[test] fn yearly_by_yeardayneg() { let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(4), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -670,7 +670,7 @@ mod test { #[test] fn yearly_by_month_and_yearday() { let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(4), bymonth: vec![4, 7], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -704,7 +704,7 @@ mod test { #[test] fn yearly_by_weekno() { let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -737,7 +737,7 @@ mod test { #[test] fn yearly_by_weekno_and_weekday() { let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -770,7 +770,7 @@ mod test { #[test] fn yearly_by_weekno_and_weekday_large() { let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -803,7 +803,7 @@ mod test { #[test] fn yearly_by_weekno_and_weekday_last() { let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -836,7 +836,7 @@ mod test { #[test] fn yearly_by_weekno_and_weekday53_last() { let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -869,7 +869,7 @@ mod test { #[test] fn yearly_by_hour() { let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(3), bymonth: vec![9], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -902,7 +902,7 @@ mod test { #[test] fn yearly_by_minute() { let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(3), bymonth: vec![9], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -935,7 +935,7 @@ mod test { #[test] fn yearly_by_second() { let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(3), bymonth: vec![9], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -968,7 +968,7 @@ mod test { #[test] fn yearly_by_hour_and_minute() { let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(3), bymonth: vec![9], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -1001,7 +1001,7 @@ mod test { #[test] fn yearly_by_hour_and_second() { let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(3), bymonth: vec![9], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -1034,7 +1034,7 @@ mod test { #[test] fn yearly_by_minute_and_second() { let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(3), bymonth: vec![9], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -1067,7 +1067,7 @@ mod test { #[test] fn yearly_by_hour_and_minute_and_second() { let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(3), bymonth: vec![9], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -1100,7 +1100,7 @@ mod test { #[test] fn yearly_by_setpos() { let options = ParsedOptions { - freq: Frequenzy::YEARLY, + freq: Frequenzy::Yearly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -1133,7 +1133,7 @@ mod test { #[test] fn monthly() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -1166,7 +1166,7 @@ mod test { #[test] fn monthly_interval() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -1199,7 +1199,7 @@ mod test { #[test] fn monthly_interval_large() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -1232,7 +1232,7 @@ mod test { #[test] fn monthly_by_easter() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -1265,7 +1265,7 @@ mod test { #[test] fn monthly_by_easterpos() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -1298,7 +1298,7 @@ mod test { #[test] fn monthly_by_easterpos_neg() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -1331,7 +1331,7 @@ mod test { #[test] fn monthly_neg_by_monthday_janfeb_for_nonleapyear() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(4), bymonth: vec![], dtstart: ymd_hms(2013, 12, 1, 9, 0, 0), @@ -1365,7 +1365,7 @@ mod test { #[test] fn monthly_neg_by_monthday_janfeb_for_leapyear() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(4), bymonth: vec![], dtstart: ymd_hms(2015, 12, 1, 9, 0, 0), @@ -1399,7 +1399,7 @@ mod test { #[test] fn monthly_neg_monthday() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(6), bymonth: vec![], dtstart: ymd_hms(2015, 12, 1, 9, 0, 0), @@ -1435,7 +1435,7 @@ mod test { #[test] fn monthly_by_month() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(3), bymonth: vec![1, 3], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -1468,7 +1468,7 @@ mod test { #[test] fn monthly_by_monthday() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -1501,7 +1501,7 @@ mod test { #[test] fn monthly_by_month_and_monthday() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(3), bymonth: vec![1, 3], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -1534,7 +1534,7 @@ mod test { #[test] fn monthly_by_weekday() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -1567,7 +1567,7 @@ mod test { #[test] fn monthly_by_nweekday() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -1600,7 +1600,7 @@ mod test { #[test] fn monthly_by_nweekday_large() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -1633,7 +1633,7 @@ mod test { #[test] fn monthly_by_month_and_weekday() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(3), bymonth: vec![1, 3], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -1666,7 +1666,7 @@ mod test { #[test] fn monthly_by_month_and_nweekday() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(3), bymonth: vec![1, 3], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -1699,7 +1699,7 @@ mod test { #[test] fn monthly_by_month_and_nweekday_large() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(3), bymonth: vec![1, 3], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -1732,7 +1732,7 @@ mod test { #[test] fn monthly_by_monthday_and_weekday() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -1765,7 +1765,7 @@ mod test { #[test] fn monthly_by_month_and_monthday_and_weekday() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(3), bymonth: vec![1, 3], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -1798,7 +1798,7 @@ mod test { #[test] fn monthly_by_yearday() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(4), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -1832,7 +1832,7 @@ mod test { #[test] fn monthly_by_yeardayneg() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(4), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -1866,7 +1866,7 @@ mod test { #[test] fn monthly_by_month_and_yearday() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(4), bymonth: vec![4, 7], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -1900,7 +1900,7 @@ mod test { #[test] fn monthly_by_weekno() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -1935,7 +1935,7 @@ mod test { #[test] fn monthly_by_weekno_and_weekday() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -1970,7 +1970,7 @@ mod test { #[test] fn monthly_by_weekno_and_weekday_large() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -2003,7 +2003,7 @@ mod test { #[test] fn monthly_by_weekno_and_weekday_last() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -2036,7 +2036,7 @@ mod test { #[test] fn monthly_by_weekno_and_weekday53() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -2069,7 +2069,7 @@ mod test { #[test] fn monthly_by_hour() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -2102,7 +2102,7 @@ mod test { #[test] fn monthly_by_minute() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -2135,7 +2135,7 @@ mod test { #[test] fn monthly_by_second() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -2168,7 +2168,7 @@ mod test { #[test] fn monthly_by_hour_and_minute() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -2201,7 +2201,7 @@ mod test { #[test] fn monthly_by_hour_and_second() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -2234,7 +2234,7 @@ mod test { #[test] fn monthly_by_minute_and_second() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -2267,7 +2267,7 @@ mod test { #[test] fn monthly_by_hour_and_minute_and_second() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -2300,7 +2300,7 @@ mod test { #[test] fn monthly_by_setpos() { let options = ParsedOptions { - freq: Frequenzy::MONTHLY, + freq: Frequenzy::Monthly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -2333,7 +2333,7 @@ mod test { #[test] fn weekly() { let options = ParsedOptions { - freq: Frequenzy::WEEKLY, + freq: Frequenzy::Weekly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -2366,7 +2366,7 @@ mod test { #[test] fn weekly_interval() { let options = ParsedOptions { - freq: Frequenzy::WEEKLY, + freq: Frequenzy::Weekly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -2399,7 +2399,7 @@ mod test { #[test] fn weekly_interval_large() { let options = ParsedOptions { - freq: Frequenzy::WEEKLY, + freq: Frequenzy::Weekly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -2432,7 +2432,7 @@ mod test { #[test] fn weekly_by_month() { let options = ParsedOptions { - freq: Frequenzy::WEEKLY, + freq: Frequenzy::Weekly, count: Some(6), bymonth: vec![1, 3], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -2468,7 +2468,7 @@ mod test { #[test] fn weekly_by_monthday() { let options = ParsedOptions { - freq: Frequenzy::WEEKLY, + freq: Frequenzy::Weekly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -2501,7 +2501,7 @@ mod test { #[test] fn weekly_by_month_and_monthday() { let options = ParsedOptions { - freq: Frequenzy::WEEKLY, + freq: Frequenzy::Weekly, count: Some(3), bymonth: vec![1, 3], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -2534,7 +2534,7 @@ mod test { #[test] fn weekly_by_weekday() { let options = ParsedOptions { - freq: Frequenzy::WEEKLY, + freq: Frequenzy::Weekly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -2568,7 +2568,7 @@ mod test { #[test] fn weekly_by_nweekday() { let options = ParsedOptions { - freq: Frequenzy::WEEKLY, + freq: Frequenzy::Weekly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -2601,7 +2601,7 @@ mod test { #[test] fn weekly_by_month_and_weekday() { let options = ParsedOptions { - freq: Frequenzy::WEEKLY, + freq: Frequenzy::Weekly, count: Some(3), bymonth: vec![1, 3], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -2634,7 +2634,7 @@ mod test { #[test] fn weekly_by_monthday_and_weekday() { let options = ParsedOptions { - freq: Frequenzy::WEEKLY, + freq: Frequenzy::Weekly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -2667,7 +2667,7 @@ mod test { #[test] fn weekly_by_month_monthday_and_weekday() { let options = ParsedOptions { - freq: Frequenzy::WEEKLY, + freq: Frequenzy::Weekly, count: Some(3), bymonth: vec![1, 3], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -2700,7 +2700,7 @@ mod test { #[test] fn weekly_by_yearday() { let options = ParsedOptions { - freq: Frequenzy::WEEKLY, + freq: Frequenzy::Weekly, count: Some(4), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -2734,7 +2734,7 @@ mod test { #[test] fn weekly_by_yeardayneg() { let options = ParsedOptions { - freq: Frequenzy::WEEKLY, + freq: Frequenzy::Weekly, count: Some(4), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -2768,7 +2768,7 @@ mod test { #[test] fn weekly_by_month_yearday() { let options = ParsedOptions { - freq: Frequenzy::WEEKLY, + freq: Frequenzy::Weekly, count: Some(4), bymonth: vec![1, 7], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -2802,7 +2802,7 @@ mod test { #[test] fn weekly_by_weekno() { let options = ParsedOptions { - freq: Frequenzy::WEEKLY, + freq: Frequenzy::Weekly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -2835,7 +2835,7 @@ mod test { #[test] fn weekly_by_weekno_and_weekday() { let options = ParsedOptions { - freq: Frequenzy::WEEKLY, + freq: Frequenzy::Weekly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -2868,7 +2868,7 @@ mod test { #[test] fn weekly_by_weekno_and_weekday_large() { let options = ParsedOptions { - freq: Frequenzy::WEEKLY, + freq: Frequenzy::Weekly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -2901,7 +2901,7 @@ mod test { #[test] fn weekly_by_weekno_and_weekday_last() { let options = ParsedOptions { - freq: Frequenzy::WEEKLY, + freq: Frequenzy::Weekly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -2934,7 +2934,7 @@ mod test { #[test] fn weekly_by_weekno_and_weekday53() { let options = ParsedOptions { - freq: Frequenzy::WEEKLY, + freq: Frequenzy::Weekly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -2967,7 +2967,7 @@ mod test { #[test] fn weekly_by_hour() { let options = ParsedOptions { - freq: Frequenzy::WEEKLY, + freq: Frequenzy::Weekly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -3000,7 +3000,7 @@ mod test { #[test] fn weekly_by_minute() { let options = ParsedOptions { - freq: Frequenzy::WEEKLY, + freq: Frequenzy::Weekly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -3033,7 +3033,7 @@ mod test { #[test] fn weekly_by_second() { let options = ParsedOptions { - freq: Frequenzy::WEEKLY, + freq: Frequenzy::Weekly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -3066,7 +3066,7 @@ mod test { #[test] fn weekly_by_hour_and_minute() { let options = ParsedOptions { - freq: Frequenzy::WEEKLY, + freq: Frequenzy::Weekly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -3099,7 +3099,7 @@ mod test { #[test] fn weekly_by_hour_and_second() { let options = ParsedOptions { - freq: Frequenzy::WEEKLY, + freq: Frequenzy::Weekly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -3132,7 +3132,7 @@ mod test { #[test] fn weekly_by_minute_and_second() { let options = ParsedOptions { - freq: Frequenzy::WEEKLY, + freq: Frequenzy::Weekly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -3165,7 +3165,7 @@ mod test { #[test] fn weekly_by_hour_and_minute_and_second() { let options = ParsedOptions { - freq: Frequenzy::WEEKLY, + freq: Frequenzy::Weekly, count: Some(5), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -3200,7 +3200,7 @@ mod test { #[test] fn weekly_by_setpos() { let options = ParsedOptions { - freq: Frequenzy::WEEKLY, + freq: Frequenzy::Weekly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -3233,7 +3233,7 @@ mod test { #[test] fn daily() { let options = ParsedOptions { - freq: Frequenzy::DAILY, + freq: Frequenzy::Daily, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -3266,7 +3266,7 @@ mod test { #[test] fn daily_interval() { let options = ParsedOptions { - freq: Frequenzy::DAILY, + freq: Frequenzy::Daily, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -3299,7 +3299,7 @@ mod test { #[test] fn daily_interval_large() { let options = ParsedOptions { - freq: Frequenzy::DAILY, + freq: Frequenzy::Daily, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -3332,7 +3332,7 @@ mod test { #[test] fn daily_by_month() { let options = ParsedOptions { - freq: Frequenzy::DAILY, + freq: Frequenzy::Daily, count: Some(3), bymonth: vec![1, 3], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -3365,7 +3365,7 @@ mod test { #[test] fn daily_by_monthday() { let options = ParsedOptions { - freq: Frequenzy::DAILY, + freq: Frequenzy::Daily, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -3398,7 +3398,7 @@ mod test { #[test] fn daily_by_month_and_monthday() { let options = ParsedOptions { - freq: Frequenzy::DAILY, + freq: Frequenzy::Daily, count: Some(3), bymonth: vec![1, 3], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -3431,7 +3431,7 @@ mod test { #[test] fn daily_by_weekday() { let options = ParsedOptions { - freq: Frequenzy::DAILY, + freq: Frequenzy::Daily, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -3464,7 +3464,7 @@ mod test { #[test] fn daily_by_month_and_weekday() { let options = ParsedOptions { - freq: Frequenzy::DAILY, + freq: Frequenzy::Daily, count: Some(3), bymonth: vec![1, 3], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -3497,7 +3497,7 @@ mod test { #[test] fn daily_by_monthday_and_weekday() { let options = ParsedOptions { - freq: Frequenzy::DAILY, + freq: Frequenzy::Daily, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -3530,7 +3530,7 @@ mod test { #[test] fn daily_by_month_and_monthday_and_weekday() { let options = ParsedOptions { - freq: Frequenzy::DAILY, + freq: Frequenzy::Daily, count: Some(3), bymonth: vec![1, 3], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -3563,7 +3563,7 @@ mod test { #[test] fn daily_by_yearday() { let options = ParsedOptions { - freq: Frequenzy::DAILY, + freq: Frequenzy::Daily, count: Some(4), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -3597,7 +3597,7 @@ mod test { #[test] fn daily_by_yeardayneg() { let options = ParsedOptions { - freq: Frequenzy::DAILY, + freq: Frequenzy::Daily, count: Some(4), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -3631,7 +3631,7 @@ mod test { #[test] fn daily_by_month_and_yearday() { let options = ParsedOptions { - freq: Frequenzy::DAILY, + freq: Frequenzy::Daily, count: Some(4), bymonth: vec![1, 7], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -3665,7 +3665,7 @@ mod test { #[test] fn daily_by_weekno() { let options = ParsedOptions { - freq: Frequenzy::DAILY, + freq: Frequenzy::Daily, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -3700,7 +3700,7 @@ mod test { #[test] fn daily_by_weekno_and_weekday() { let options = ParsedOptions { - freq: Frequenzy::DAILY, + freq: Frequenzy::Daily, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -3735,7 +3735,7 @@ mod test { #[test] fn daily_by_weekno_and_weekday_large() { let options = ParsedOptions { - freq: Frequenzy::DAILY, + freq: Frequenzy::Daily, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -3768,7 +3768,7 @@ mod test { #[test] fn daily_by_weekno_and_weekday_last() { let options = ParsedOptions { - freq: Frequenzy::DAILY, + freq: Frequenzy::Daily, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -3801,7 +3801,7 @@ mod test { #[test] fn daily_by_weekno_and_weekday53() { let options = ParsedOptions { - freq: Frequenzy::DAILY, + freq: Frequenzy::Daily, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -3834,7 +3834,7 @@ mod test { #[test] fn daily_by_hour() { let options = ParsedOptions { - freq: Frequenzy::DAILY, + freq: Frequenzy::Daily, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -3867,7 +3867,7 @@ mod test { #[test] fn daily_by_minute() { let options = ParsedOptions { - freq: Frequenzy::DAILY, + freq: Frequenzy::Daily, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -3900,7 +3900,7 @@ mod test { #[test] fn daily_by_second() { let options = ParsedOptions { - freq: Frequenzy::DAILY, + freq: Frequenzy::Daily, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -3933,7 +3933,7 @@ mod test { #[test] fn daily_by_hour_and_minute() { let options = ParsedOptions { - freq: Frequenzy::DAILY, + freq: Frequenzy::Daily, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -3966,7 +3966,7 @@ mod test { #[test] fn daily_by_hour_and_second() { let options = ParsedOptions { - freq: Frequenzy::DAILY, + freq: Frequenzy::Daily, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -3999,7 +3999,7 @@ mod test { #[test] fn daily_by_minute_and_second() { let options = ParsedOptions { - freq: Frequenzy::DAILY, + freq: Frequenzy::Daily, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -4032,7 +4032,7 @@ mod test { #[test] fn daily_by_hour_and_minute_and_second() { let options = ParsedOptions { - freq: Frequenzy::DAILY, + freq: Frequenzy::Daily, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -4065,7 +4065,7 @@ mod test { #[test] fn daily_by_setpos() { let options = ParsedOptions { - freq: Frequenzy::DAILY, + freq: Frequenzy::Daily, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -4098,7 +4098,7 @@ mod test { #[test] fn hourly() { let options = ParsedOptions { - freq: Frequenzy::HOURLY, + freq: Frequenzy::Hourly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -4131,7 +4131,7 @@ mod test { #[test] fn hourly_interval() { let options = ParsedOptions { - freq: Frequenzy::HOURLY, + freq: Frequenzy::Hourly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -4164,7 +4164,7 @@ mod test { #[test] fn hourly_interval_large() { let options = ParsedOptions { - freq: Frequenzy::HOURLY, + freq: Frequenzy::Hourly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -4197,7 +4197,7 @@ mod test { #[test] fn hourly_by_month() { let options = ParsedOptions { - freq: Frequenzy::HOURLY, + freq: Frequenzy::Hourly, count: Some(3), bymonth: vec![1, 3], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -4230,7 +4230,7 @@ mod test { #[test] fn hourly_by_monthday() { let options = ParsedOptions { - freq: Frequenzy::HOURLY, + freq: Frequenzy::Hourly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -4263,7 +4263,7 @@ mod test { #[test] fn hourly_by_month_and_monthday() { let options = ParsedOptions { - freq: Frequenzy::HOURLY, + freq: Frequenzy::Hourly, count: Some(3), bymonth: vec![1, 3], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -4296,7 +4296,7 @@ mod test { #[test] fn hourly_by_weekday() { let options = ParsedOptions { - freq: Frequenzy::HOURLY, + freq: Frequenzy::Hourly, count: Some(5), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -4331,7 +4331,7 @@ mod test { #[test] fn hourly_by_month_and_weekday() { let options = ParsedOptions { - freq: Frequenzy::HOURLY, + freq: Frequenzy::Hourly, count: Some(3), bymonth: vec![1, 3], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -4364,7 +4364,7 @@ mod test { #[test] fn hourly_by_monthday_and_weekday() { let options = ParsedOptions { - freq: Frequenzy::HOURLY, + freq: Frequenzy::Hourly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -4397,7 +4397,7 @@ mod test { #[test] fn hourly_by_month_and_monthday_and_weekday() { let options = ParsedOptions { - freq: Frequenzy::HOURLY, + freq: Frequenzy::Hourly, count: Some(3), bymonth: vec![1, 3], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -4430,7 +4430,7 @@ mod test { #[test] fn hourly_by_yearday() { let options = ParsedOptions { - freq: Frequenzy::HOURLY, + freq: Frequenzy::Hourly, count: Some(8), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -4468,7 +4468,7 @@ mod test { #[test] fn hourly_by_yeardayneg() { let options = ParsedOptions { - freq: Frequenzy::HOURLY, + freq: Frequenzy::Hourly, count: Some(8), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -4506,7 +4506,7 @@ mod test { #[test] fn hourly_by_month_and_yearday() { let options = ParsedOptions { - freq: Frequenzy::HOURLY, + freq: Frequenzy::Hourly, count: Some(4), bymonth: vec![4, 7], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -4540,7 +4540,7 @@ mod test { #[test] fn hourly_by_weekno() { let options = ParsedOptions { - freq: Frequenzy::HOURLY, + freq: Frequenzy::Hourly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -4573,7 +4573,7 @@ mod test { #[test] fn hourly_by_weekno_and_weekday() { let options = ParsedOptions { - freq: Frequenzy::HOURLY, + freq: Frequenzy::Hourly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -4606,7 +4606,7 @@ mod test { #[test] fn hourly_by_weekno_and_weekday_large() { let options = ParsedOptions { - freq: Frequenzy::HOURLY, + freq: Frequenzy::Hourly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -4639,7 +4639,7 @@ mod test { #[test] fn hourly_by_weekno_and_weekday_last() { let options = ParsedOptions { - freq: Frequenzy::HOURLY, + freq: Frequenzy::Hourly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -4672,7 +4672,7 @@ mod test { #[test] fn hourly_by_weekno_and_weekday53() { let options = ParsedOptions { - freq: Frequenzy::HOURLY, + freq: Frequenzy::Hourly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -4705,7 +4705,7 @@ mod test { #[test] fn hourly_by_hour() { let options = ParsedOptions { - freq: Frequenzy::HOURLY, + freq: Frequenzy::Hourly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -4738,7 +4738,7 @@ mod test { #[test] fn hourly_by_minute() { let options = ParsedOptions { - freq: Frequenzy::HOURLY, + freq: Frequenzy::Hourly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -4771,7 +4771,7 @@ mod test { #[test] fn hourly_by_second() { let options = ParsedOptions { - freq: Frequenzy::HOURLY, + freq: Frequenzy::Hourly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -4804,7 +4804,7 @@ mod test { #[test] fn hourly_by_hour_and_minute() { let options = ParsedOptions { - freq: Frequenzy::HOURLY, + freq: Frequenzy::Hourly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -4837,7 +4837,7 @@ mod test { #[test] fn hourly_by_hour_and_second() { let options = ParsedOptions { - freq: Frequenzy::HOURLY, + freq: Frequenzy::Hourly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -4870,7 +4870,7 @@ mod test { #[test] fn hourly_by_minute_and_second() { let options = ParsedOptions { - freq: Frequenzy::HOURLY, + freq: Frequenzy::Hourly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -4903,7 +4903,7 @@ mod test { #[test] fn hourly_by_hour_and_minute_and_second() { let options = ParsedOptions { - freq: Frequenzy::HOURLY, + freq: Frequenzy::Hourly, count: Some(5), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -4938,7 +4938,7 @@ mod test { #[test] fn hourly_by_setpos() { let options = ParsedOptions { - freq: Frequenzy::HOURLY, + freq: Frequenzy::Hourly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -4971,7 +4971,7 @@ mod test { #[test] fn until_not_matching() { let options = ParsedOptions { - freq: Frequenzy::DAILY, + freq: Frequenzy::Daily, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -5004,7 +5004,7 @@ mod test { #[test] fn until_matching() { let options = ParsedOptions { - freq: Frequenzy::DAILY, + freq: Frequenzy::Daily, count: Some(4), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -5037,7 +5037,7 @@ mod test { #[test] fn until_single() { let options = ParsedOptions { - freq: Frequenzy::DAILY, + freq: Frequenzy::Daily, count: Some(1), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -5063,7 +5063,7 @@ mod test { #[test] fn until_empty() { let options = ParsedOptions { - freq: Frequenzy::DAILY, + freq: Frequenzy::Daily, count: Some(1), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -5089,7 +5089,7 @@ mod test { #[test] fn until_with_date() { let options = ParsedOptions { - freq: Frequenzy::DAILY, + freq: Frequenzy::Daily, count: Some(4), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -5122,7 +5122,7 @@ mod test { #[test] fn wkst_interval_mo() { let options = ParsedOptions { - freq: Frequenzy::WEEKLY, + freq: Frequenzy::Weekly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), @@ -5155,7 +5155,7 @@ mod test { #[test] fn wkst_interval_su() { let options = ParsedOptions { - freq: Frequenzy::WEEKLY, + freq: Frequenzy::Weekly, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), |