diff options
-rw-r--r-- | README.md | 3 | ||||
-rw-r--r-- | src/easter.rs | 43 | ||||
-rw-r--r-- | src/iter.rs | 2 | ||||
-rw-r--r-- | src/iterinfo.rs | 14 | ||||
-rw-r--r-- | src/lib.rs | 1 | ||||
-rw-r--r-- | src/options.rs | 3 | ||||
-rw-r--r-- | tests/rrule.rs | 9197 |
7 files changed, 4680 insertions, 4583 deletions
@@ -6,7 +6,8 @@ Fast implementation of rrule # todos - tests for minutes and seconds FREQ -- neg month day, year day etc +- neg month day - by easter stuff - timezone - subseconds +- cache diff --git a/src/easter.rs b/src/easter.rs new file mode 100644 index 0000000..b41b270 --- /dev/null +++ b/src/easter.rs @@ -0,0 +1,43 @@ +use chrono::prelude::*; + +pub fn easter(y: isize, offset: isize) -> Vec<isize> { + let a = y % 19; + let b = (y as f32 / 100_f32).floor() as isize; + let c = y % 100; + let d = (b as f32 / 4_f32).floor() as isize; + let e = b % 4; + let f = ((b + 8) as f32 / 25_f32).floor() as isize; + let g = ((b - f + 1) as f32 / 3_f32).floor() as isize; + let h = (19 * a + b - d - g + 15) % 30; + let i = (c as f32 / 4_f32).floor() as isize; + let k = c % 4; + let l = (32 + 2 * e + 2 * i - h - k) % 7; + let m = ((a + 11 * h + 22 * l) as f32 / 451_f32).floor() as isize; + let month = ((h + l - 7 * m + 114) as f32 / 31_f32).floor() as u32; + let day = ((h + l - 7 * m + 114) % 31) + 1; + let date = Utc + .ymd(y as i32, month, (day + offset) as u32) + .and_hms(0, 0, 0); + let year_start = Utc.ymd(y as i32, 1, 1).and_hms(0, 0, 0); + return vec![ + ((date.timestamp() - year_start.timestamp()) as f32 / (60 * 60 * 24) as f32).ceil() + as isize, + ]; +} + +#[cfg(test)] +mod test_easter_masks { + use super::*; + + #[test] + fn easter_mask() { + let mask = easter(1997, 0); + assert_eq!(mask[0], 88); + let mask = easter(1998, 0); + assert_eq!(mask[0], 101); + let mask = easter(1999, 0); + assert_eq!(mask[0], 93); + let mask = easter(2000, 0); + assert_eq!(mask[0], 113); + } +} diff --git a/src/iter.rs b/src/iter.rs index e556318..59c9c96 100644 --- a/src/iter.rs +++ b/src/iter.rs @@ -305,6 +305,8 @@ pub fn is_filtered(ii: &IterInfo, current_day: usize, options: &ParsedOptions) - || (ii.nwdaymask().is_some() && not_empty(ii.nwdaymask().unwrap()) && (ii.nwdaymask().unwrap()[current_day]) == 0) + || (options.byeaster.is_some() + && !(includes(ii.eastermask().unwrap(), &(current_day as isize)))) || ((not_empty(&options.bymonthday) || not_empty(&options.bynmonthday)) && !includes(&options.bymonthday, &ii.mdaymask().unwrap()[current_day]) && !includes(&options.bynmonthday, &ii.nmdaymask().unwrap()[current_day])) diff --git a/src/iterinfo.rs b/src/iterinfo.rs index 18020d5..ef1cded 100644 --- a/src/iterinfo.rs +++ b/src/iterinfo.rs @@ -1,4 +1,5 @@ use crate::datetime::*; +use crate::easter::*; use crate::monthinfo::*; use crate::options::*; use crate::yearinfo::*; @@ -7,6 +8,7 @@ use chrono::prelude::*; pub struct IterInfo<'a> { pub yearinfo: Option<YearInfo>, pub monthinfo: Option<MonthInfo>, + pub eastermask: Option<Vec<isize>>, options: &'a ParsedOptions, } @@ -16,6 +18,7 @@ impl<'a> IterInfo<'a> { options, yearinfo: None, monthinfo: None, + eastermask: None, } } @@ -39,6 +42,10 @@ impl<'a> IterInfo<'a> { )); } } + + if let Some(byeaster) = self.options.byeaster { + self.eastermask = Some(easter(year, byeaster)); + } } pub fn lastyear(&self) -> Option<isize> { @@ -71,6 +78,13 @@ impl<'a> IterInfo<'a> { None => None, } } + + pub fn eastermask(&self) -> Option<&Vec<isize>> { + match &self.eastermask { + Some(mask) => Some(&mask), + None => None, + } + } pub fn wdaymask(&self) -> Option<&Vec<usize>> { match &self.yearinfo { Some(info) => Some(&info.wdaymask), @@ -2,6 +2,7 @@ extern crate chrono; extern crate once_cell; pub mod datetime; +pub mod easter; pub mod iter; pub mod iterinfo; pub mod masks; diff --git a/src/options.rs b/src/options.rs index 9d037db..14712a5 100644 --- a/src/options.rs +++ b/src/options.rs @@ -45,7 +45,9 @@ pub struct ParsedOptions { pub byminute: Vec<usize>, pub bysecond: Vec<usize>, pub bynweekday: Vec<Vec<isize>>, + pub byeaster: Option<isize>, } + impl ParsedOptions { pub fn new(freq: Frequenzy, dtstart: &DateTime<Utc>) -> Self { Self { @@ -67,6 +69,7 @@ impl ParsedOptions { byhour: vec![dtstart.hour() as usize], byminute: vec![dtstart.minute() as usize], bysecond: vec![dtstart.second() as usize], + byeaster: None, } } diff --git a/tests/rrule.rs b/tests/rrule.rs index e15b714..8a12c31 100644 --- a/tests/rrule.rs +++ b/tests/rrule.rs @@ -89,975 +89,12 @@ mod test { } #[test] - fn yearly_by_month() { - let mut options = ParsedOptions { - freq: Frequenzy::YEARLY, - count: Some(3), - bymonth: vec![1, 3], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![2], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 1, 2, 9, 0, 0), - ymd_hms(1998, 3, 2, 9, 0, 0), - ymd_hms(1999, 1, 2, 9, 0, 0), - ], - ); - } - - #[test] - fn yearly_by_monthday() { - let mut options = ParsedOptions { - freq: Frequenzy::YEARLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![1, 3], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 3, 9, 0, 0), - ymd_hms(1997, 10, 1, 9, 0, 0), - ymd_hms(1997, 10, 3, 9, 0, 0), - ], - ); - } - - #[test] - fn yearly_by_month_and_monthday() { - let mut options = ParsedOptions { - freq: Frequenzy::YEARLY, - count: Some(3), - bymonth: vec![1, 3], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![5, 7], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 1, 5, 9, 0, 0), - ymd_hms(1998, 1, 7, 9, 0, 0), - ymd_hms(1998, 3, 5, 9, 0, 0), - ], - ); - } - - #[test] - fn yearly_by_weekday() { - let mut options = ParsedOptions { - freq: Frequenzy::YEARLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![1, 3], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 0, 0), - ymd_hms(1997, 9, 4, 9, 0, 0), - ymd_hms(1997, 9, 9, 9, 0, 0), - ], - ); - } - - #[test] - fn yearly_by_nweekday() { - let mut options = ParsedOptions { - freq: Frequenzy::YEARLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![vec![1, 1], vec![3, -1]], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 12, 25, 9, 0, 0), - ymd_hms(1998, 1, 6, 9, 0, 0), - ymd_hms(1998, 12, 31, 9, 0, 0), - ], - ); - } - - #[test] - fn yearly_by_nweekday_large() { - let mut options = ParsedOptions { - freq: Frequenzy::YEARLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![vec![1, 13], vec![3, -13]], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 10, 2, 9, 0, 0), - ymd_hms(1998, 3, 31, 9, 0, 0), - ymd_hms(1998, 10, 8, 9, 0, 0), - ], - ); - } - - #[test] - fn yearly_by_month_and_weekday() { - let mut options = ParsedOptions { - freq: Frequenzy::YEARLY, - count: Some(3), - bymonth: vec![1, 3], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![1, 3], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 1, 1, 9, 0, 0), - ymd_hms(1998, 1, 6, 9, 0, 0), - ymd_hms(1998, 1, 8, 9, 0, 0), - ], - ); - } - - #[test] - fn yearly_by_month_and_nweekday() { - let mut options = ParsedOptions { - freq: Frequenzy::YEARLY, - count: Some(3), - bymonth: vec![1, 3], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![vec![1, 1], vec![3, -1]], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 1, 6, 9, 0, 0), - ymd_hms(1998, 1, 29, 9, 0, 0), - ymd_hms(1998, 3, 3, 9, 0, 0), - ], - ); - } - - #[test] - fn yearly_by_month_and_nweekday_large() { - let mut options = ParsedOptions { - freq: Frequenzy::YEARLY, - count: Some(3), - bymonth: vec![1, 3], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![vec![1, 3], vec![3, -3]], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 1, 15, 9, 0, 0), - ymd_hms(1998, 1, 20, 9, 0, 0), - ymd_hms(1998, 3, 12, 9, 0, 0), - ], - ); - } - - #[test] - fn yearly_by_monthday_and_weekday() { - let mut options = ParsedOptions { - freq: Frequenzy::YEARLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![1, 3], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![1, 3], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 1, 1, 9, 0, 0), - ymd_hms(1998, 2, 3, 9, 0, 0), - ymd_hms(1998, 3, 3, 9, 0, 0), - ], - ); - } - - #[test] - fn yearly_by_month_and_monthday_and_weekday() { - let mut options = ParsedOptions { - freq: Frequenzy::YEARLY, - count: Some(3), - bymonth: vec![1, 3], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![1, 3], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![1, 3], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 1, 1, 9, 0, 0), - ymd_hms(1998, 3, 3, 9, 0, 0), - ymd_hms(2001, 3, 1, 9, 0, 0), - ], - ); - } - - #[test] - fn yearly_by_yearday() { - let mut options = ParsedOptions { - freq: Frequenzy::YEARLY, - count: Some(4), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![1, 100, 200, 365], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 12, 31, 9, 0, 0), - ymd_hms(1998, 1, 1, 9, 0, 0), - ymd_hms(1998, 4, 10, 9, 0, 0), - ymd_hms(1998, 7, 19, 9, 0, 0), - ], - ); - } - - #[test] - fn yearly_by_yeardayneg() { - let mut options = ParsedOptions { - freq: Frequenzy::YEARLY, - count: Some(4), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![-365, -266, -166, -1], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 12, 31, 9, 0, 0), - ymd_hms(1998, 1, 1, 9, 0, 0), - ymd_hms(1998, 4, 10, 9, 0, 0), - ymd_hms(1998, 7, 19, 9, 0, 0), - ], - ); - } - - #[test] - fn yearly_by_month_and_yearday() { - let mut options = ParsedOptions { - freq: Frequenzy::YEARLY, - count: Some(4), - bymonth: vec![4, 7], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![1, 100, 200, 365], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 4, 10, 9, 0, 0), - ymd_hms(1998, 7, 19, 9, 0, 0), - ymd_hms(1999, 4, 10, 9, 0, 0), - ymd_hms(1999, 7, 19, 9, 0, 0), - ], - ); - } - - #[test] - fn yearly_by_weekno() { - let mut options = ParsedOptions { - freq: Frequenzy::YEARLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![20], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 5, 11, 9, 0, 0), - ymd_hms(1998, 5, 12, 9, 0, 0), - ymd_hms(1998, 5, 13, 9, 0, 0), - ], - ); - } - - #[test] - fn yearly_by_weekno_and_weekday() { - let mut options = ParsedOptions { - freq: Frequenzy::YEARLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![0], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![1], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 12, 29, 9, 0, 0), - ymd_hms(1999, 1, 4, 9, 0, 0), - ymd_hms(2000, 1, 3, 9, 0, 0), - ], - ); - } - - #[test] - fn yearly_by_weekno_and_weekday_large() { - let mut options = ParsedOptions { - freq: Frequenzy::YEARLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![6], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![52], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 12, 28, 9, 0, 0), - ymd_hms(1998, 12, 27, 9, 0, 0), - ymd_hms(2000, 1, 2, 9, 0, 0), - ], - ); - } - - #[test] - fn yearly_by_weekno_and_weekday_last() { + fn yearly_by_easter() { let mut options = ParsedOptions { freq: Frequenzy::YEARLY, count: Some(3), bymonth: vec![], dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![6], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![-1], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 12, 28, 9, 0, 0), - ymd_hms(1999, 1, 3, 9, 0, 0), - ymd_hms(2000, 1, 2, 9, 0, 0), - ], - ); - } - - #[test] - fn yearly_by_weekno_and_weekday53_last() { - let mut options = ParsedOptions { - freq: Frequenzy::YEARLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![0], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![53], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 12, 28, 9, 0, 0), - ymd_hms(2004, 12, 27, 9, 0, 0), - ymd_hms(2009, 12, 28, 9, 0, 0), - ], - ); - } - - #[test] - fn yearly_by_hour() { - let mut options = ParsedOptions { - freq: Frequenzy::YEARLY, - count: Some(3), - bymonth: vec![9], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![6, 18], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![2], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 18, 0, 0), - ymd_hms(1998, 9, 2, 6, 0, 0), - ymd_hms(1998, 9, 2, 18, 0, 0), - ], - ); - } - - #[test] - fn yearly_by_minute() { - let mut options = ParsedOptions { - freq: Frequenzy::YEARLY, - count: Some(3), - bymonth: vec![9], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![6, 18], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![2], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 6, 0), - ymd_hms(1997, 9, 2, 9, 18, 0), - ymd_hms(1998, 9, 2, 9, 6, 0), - ], - ); - } - - #[test] - fn yearly_by_second() { - let mut options = ParsedOptions { - freq: Frequenzy::YEARLY, - count: Some(3), - bymonth: vec![9], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![6, 18], - byyearday: vec![], - bymonthday: vec![2], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 0, 6), - ymd_hms(1997, 9, 2, 9, 0, 18), - ymd_hms(1998, 9, 2, 9, 0, 6), - ], - ); - } - - #[test] - fn yearly_by_hour_and_minute() { - let mut options = ParsedOptions { - freq: Frequenzy::YEARLY, - count: Some(3), - bymonth: vec![9], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![6, 18], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![6, 18], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![2], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 18, 6, 0), - ymd_hms(1997, 9, 2, 18, 18, 0), - ymd_hms(1998, 9, 2, 6, 6, 0), - ], - ); - } - - #[test] - fn yearly_by_hour_and_second() { - let mut options = ParsedOptions { - freq: Frequenzy::YEARLY, - count: Some(3), - bymonth: vec![9], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![6, 18], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![6, 18], - byyearday: vec![], - bymonthday: vec![2], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 18, 0, 6), - ymd_hms(1997, 9, 2, 18, 0, 18), - ymd_hms(1998, 9, 2, 6, 0, 6), - ], - ); - } - - #[test] - fn yearly_by_minute_and_second() { - let mut options = ParsedOptions { - freq: Frequenzy::YEARLY, - count: Some(3), - bymonth: vec![9], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![6, 18], - bysecond: vec![6, 18], - byyearday: vec![], - bymonthday: vec![2], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 6, 6), - ymd_hms(1997, 9, 2, 9, 6, 18), - ymd_hms(1997, 9, 2, 9, 18, 6), - ], - ); - } - - #[test] - fn yearly_by_hour_and_minute_and_second() { - let mut options = ParsedOptions { - freq: Frequenzy::YEARLY, - count: Some(3), - bymonth: vec![9], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![6, 18], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![6, 18], - bysecond: vec![6, 18], - byyearday: vec![], - bymonthday: vec![2], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 18, 6, 6), - ymd_hms(1997, 9, 2, 18, 6, 18), - ymd_hms(1997, 9, 2, 18, 18, 6), - ], - ); - } - - #[test] - fn yearly_by_setpos() { - let mut options = ParsedOptions { - freq: Frequenzy::YEARLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![6, 18], - bysetpos: vec![3, -3], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![15], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 11, 15, 18, 0, 0), - ymd_hms(1998, 2, 15, 6, 0, 0), - ymd_hms(1998, 11, 15, 18, 0, 0), - ], - ); - } - - #[test] - fn monthly() { - let mut options = ParsedOptions { - freq: Frequenzy::MONTHLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![2], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 0, 0), - ymd_hms(1997, 10, 2, 9, 0, 0), - ymd_hms(1997, 11, 2, 9, 0, 0), - ], - ); - } - - #[test] - fn monthly_interval() { - let mut options = ParsedOptions { - freq: Frequenzy::MONTHLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![2], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 2, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 0, 0), - ymd_hms(1997, 11, 2, 9, 0, 0), - ymd_hms(1998, 1, 2, 9, 0, 0), - ], - ); - } - - #[test] - fn monthly_interval_large() { - let mut options = ParsedOptions { - freq: Frequenzy::MONTHLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![2], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 18, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 0, 0), - ymd_hms(1999, 3, 2, 9, 0, 0), - ymd_hms(2000, 9, 2, 9, 0, 0), - ], - ); - } - - #[test] - fn monthly_by_month() { - let mut options = ParsedOptions { - freq: Frequenzy::MONTHLY, - count: Some(3), - bymonth: vec![1, 3], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), byweekday: vec![], byhour: vec![9], bysetpos: vec![], @@ -1065,102 +102,6 @@ mod test { byminute: vec![0], bysecond: vec![0], byyearday: vec![], - bymonthday: vec![2], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 1, 2, 9, 0, 0), - ymd_hms(1998, 3, 2, 9, 0, 0), - ymd_hms(1999, 1, 2, 9, 0, 0), - ], - ); - } - - #[test] - fn monthly_by_monthday() { - let mut options = ParsedOptions { - freq: Frequenzy::MONTHLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![1, 3], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 3, 9, 0, 0), - ymd_hms(1997, 10, 1, 9, 0, 0), - ymd_hms(1997, 10, 3, 9, 0, 0), - ], - ); - } - - #[test] - fn monthly_by_month_and_monthday() { - let mut options = ParsedOptions { - freq: Frequenzy::MONTHLY, - count: Some(3), - bymonth: vec![1, 3], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![5, 7], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 1, 5, 9, 0, 0), - ymd_hms(1998, 1, 7, 9, 0, 0), - ymd_hms(1998, 3, 5, 9, 0, 0), - ], - ); - } - - #[test] - fn monthly_by_weekday() { - let mut options = ParsedOptions { - freq: Frequenzy::MONTHLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![1, 3], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], bymonthday: vec![], bynweekday: vec![], bynmonthday: vec![], @@ -1168,3526 +109,4618 @@ mod test { wkst: 0, tzid: None, interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 0, 0), - ymd_hms(1997, 9, 4, 9, 0, 0), - ymd_hms(1997, 9, 9, 9, 0, 0), - ], - ); - } - - #[test] - fn monthly_by_nweekday() { - let mut options = ParsedOptions { - freq: Frequenzy::MONTHLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![vec![1, 1], vec![3, -1]], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 0, 0), - ymd_hms(1997, 9, 25, 9, 0, 0), - ymd_hms(1997, 10, 7, 9, 0, 0), - ], - ); - } - - #[test] - fn monthly_by_nweekday_large() { - let mut options = ParsedOptions { - freq: Frequenzy::MONTHLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![vec![1, 3], vec![3, -3]], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 11, 9, 0, 0), - ymd_hms(1997, 9, 16, 9, 0, 0), - ymd_hms(1997, 10, 16, 9, 0, 0), - ], - ); - } - - #[test] - fn monthly_by_month_and_weekday() { - let mut options = ParsedOptions { - freq: Frequenzy::MONTHLY, - count: Some(3), - bymonth: vec![1, 3], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![1, 3], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 1, 1, 9, 0, 0), - ymd_hms(1998, 1, 6, 9, 0, 0), - ymd_hms(1998, 1, 8, 9, 0, 0), - ], - ); - } - - #[test] - fn monthly_by_month_and_nweekday() { - let mut options = ParsedOptions { - freq: Frequenzy::MONTHLY, - count: Some(3), - bymonth: vec![1, 3], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![vec![1, 1], vec![3, -1]], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 1, 6, 9, 0, 0), - ymd_hms(1998, 1, 29, 9, 0, 0), - ymd_hms(1998, 3, 3, 9, 0, 0), - ], - ); - } - - #[test] - fn monthly_by_month_and_nweekday_large() { - let mut options = ParsedOptions { - freq: Frequenzy::MONTHLY, - count: Some(3), - bymonth: vec![1, 3], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![vec![1, 3], vec![3, -3]], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 1, 15, 9, 0, 0), - ymd_hms(1998, 1, 20, 9, 0, 0), - ymd_hms(1998, 3, 12, 9, 0, 0), - ], - ); - } - - #[test] - fn monthly_by_monthday_and_weekday() { - let mut options = ParsedOptions { - freq: Frequenzy::MONTHLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![1, 3], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![1, 3], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 1, 1, 9, 0, 0), - ymd_hms(1998, 2, 3, 9, 0, 0), - ymd_hms(1998, 3, 3, 9, 0, 0), - ], - ); - } - - #[test] - fn monthly_by_month_and_monthday_and_weekday() { - let mut options = ParsedOptions { - freq: Frequenzy::MONTHLY, - count: Some(3), - bymonth: vec![1, 3], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![1, 3], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![1, 3], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 1, 1, 9, 0, 0), - ymd_hms(1998, 3, 3, 9, 0, 0), - ymd_hms(2001, 3, 1, 9, 0, 0), - ], - ); - } - - #[test] - fn monthly_by_yearday() { - let mut options = ParsedOptions { - freq: Frequenzy::MONTHLY, - count: Some(4), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![1, 100, 200, 365], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 12, 31, 9, 0, 0), - ymd_hms(1998, 1, 1, 9, 0, 0), - ymd_hms(1998, 4, 10, 9, 0, 0), - ymd_hms(1998, 7, 19, 9, 0, 0), - ], - ); - } - - #[test] - fn monthly_by_yeardayneg() { - let mut options = ParsedOptions { - freq: Frequenzy::MONTHLY, - count: Some(4), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![-365, -266, -166, -1], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 12, 31, 9, 0, 0), - ymd_hms(1998, 1, 1, 9, 0, 0), - ymd_hms(1998, 4, 10, 9, 0, 0), - ymd_hms(1998, 7, 19, 9, 0, 0), - ], - ); - } - - #[test] - fn monthly_by_month_and_yearday() { - let mut options = ParsedOptions { - freq: Frequenzy::MONTHLY, - count: Some(4), - bymonth: vec![4, 7], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![1, 100, 200, 365], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 4, 10, 9, 0, 0), - ymd_hms(1998, 7, 19, 9, 0, 0), - ymd_hms(1999, 4, 10, 9, 0, 0), - ymd_hms(1999, 7, 19, 9, 0, 0), - ], - ); - } - - #[test] - fn monthly_by_weekno() { - let mut options = ParsedOptions { - freq: Frequenzy::MONTHLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![20], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 5, 11, 9, 0, 0), - ymd_hms(1998, 5, 12, 9, 0, 0), - ymd_hms(1998, 5, 13, 9, 0, 0), - ], - ); - } - - // That's a nice one. The first days of week number one - // may be in the last year. - #[test] - fn monthly_by_weekno_and_weekday() { - let mut options = ParsedOptions { - freq: Frequenzy::MONTHLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![0], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![1], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 12, 29, 9, 0, 0), - ymd_hms(1999, 1, 4, 9, 0, 0), - ymd_hms(2000, 1, 3, 9, 0, 0), - ], - ); - } - - // Another nice test. The last days of week number 52/53 - // may be in the next year. - #[test] - fn monthly_by_weekno_and_weekday_large() { - let mut options = ParsedOptions { - freq: Frequenzy::MONTHLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![6], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![52], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 12, 28, 9, 0, 0), - ymd_hms(1998, 12, 27, 9, 0, 0), - ymd_hms(2000, 1, 2, 9, 0, 0), - ], - ); - } - - #[test] - fn monthly_by_weekno_and_weekday_last() { - let mut options = ParsedOptions { - freq: Frequenzy::MONTHLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![6], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![-1], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 12, 28, 9, 0, 0), - ymd_hms(1999, 1, 3, 9, 0, 0), - ymd_hms(2000, 1, 2, 9, 0, 0), - ], - ); - } - - #[test] - fn monthly_by_weekno_and_weekday53() { - let mut options = ParsedOptions { - freq: Frequenzy::MONTHLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![0], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![53], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 12, 28, 9, 0, 0), - ymd_hms(2004, 12, 27, 9, 0, 0), - ymd_hms(2009, 12, 28, 9, 0, 0), - ], - ); - } - - #[test] - fn monthly_by_hour() { - let mut options = ParsedOptions { - freq: Frequenzy::MONTHLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![6, 18], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![2], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 18, 0, 0), - ymd_hms(1997, 10, 2, 6, 0, 0), - ymd_hms(1997, 10, 2, 18, 0, 0), - ], - ); - } - - #[test] - fn monthly_by_minute() { - let mut options = ParsedOptions { - freq: Frequenzy::MONTHLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![6, 18], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![2], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 6, 0), - ymd_hms(1997, 9, 2, 9, 18, 0), - ymd_hms(1997, 10, 2, 9, 6, 0), - ], - ); - } - - #[test] - fn monthly_by_second() { - let mut options = ParsedOptions { - freq: Frequenzy::MONTHLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![6, 18], - byyearday: vec![], - bymonthday: vec![2], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 0, 6), - ymd_hms(1997, 9, 2, 9, 0, 18), - ymd_hms(1997, 10, 2, 9, 0, 6), - ], - ); - } - - #[test] - fn monthly_by_hour_and_minute() { - let mut options = ParsedOptions { - freq: Frequenzy::MONTHLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![6, 18], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![6, 18], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![2], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 18, 6, 0), - ymd_hms(1997, 9, 2, 18, 18, 0), - ymd_hms(1997, 10, 2, 6, 6, 0), - ], - ); - } - - #[test] - fn monthly_by_hour_and_second() { - let mut options = ParsedOptions { - freq: Frequenzy::MONTHLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![6, 18], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![6, 18], - byyearday: vec![], - bymonthday: vec![2], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 18, 0, 6), - ymd_hms(1997, 9, 2, 18, 0, 18), - ymd_hms(1997, 10, 2, 6, 0, 6), - ], - ); - } - - #[test] - fn monthly_by_minute_and_second() { - let mut options = ParsedOptions { - freq: Frequenzy::MONTHLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![6, 18], - bysecond: vec![6, 18], - byyearday: vec![], - bymonthday: vec![2], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 6, 6), - ymd_hms(1997, 9, 2, 9, 6, 18), - ymd_hms(1997, 9, 2, 9, 18, 6), - ], - ); - } - - #[test] - fn monthly_by_hour_and_minute_and_second() { - let mut options = ParsedOptions { - freq: Frequenzy::MONTHLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![6, 18], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![6, 18], - bysecond: vec![6, 18], - byyearday: vec![], - bymonthday: vec![2], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 18, 6, 6), - ymd_hms(1997, 9, 2, 18, 6, 18), - ymd_hms(1997, 9, 2, 18, 18, 6), - ], - ); - } - - #[test] - fn monthly_by_setpos() { - let mut options = ParsedOptions { - freq: Frequenzy::MONTHLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![6, 18], - bysetpos: vec![3, -3], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![13, 17], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 13, 18, 0, 0), - ymd_hms(1997, 9, 17, 6, 0, 0), - ymd_hms(1997, 10, 13, 18, 0, 0), - ], - ); - } - - #[test] - fn weekly() { - let mut options = ParsedOptions { - freq: Frequenzy::WEEKLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![1], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 0, 0), - ymd_hms(1997, 9, 9, 9, 0, 0), - ymd_hms(1997, 9, 16, 9, 0, 0), - ], - ); - } - - #[test] - fn weekly_interval() { - let mut options = ParsedOptions { - freq: Frequenzy::WEEKLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![1], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 2, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 0, 0), - ymd_hms(1997, 9, 16, 9, 0, 0), - ymd_hms(1997, 9, 30, 9, 0, 0), - ], - ); - } - - #[test] - fn weekly_interval_large() { - let mut options = ParsedOptions { - freq: Frequenzy::WEEKLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![1], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 20, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 0, 0), - ymd_hms(1998, 1, 20, 9, 0, 0), - ymd_hms(1998, 6, 9, 9, 0, 0), - ], - ); - } - - #[test] - fn weekly_by_month() { - let mut options = ParsedOptions { - freq: Frequenzy::WEEKLY, - count: Some(6), - bymonth: vec![1, 3], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![1], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 1, 6, 9, 0, 0), - ymd_hms(1998, 1, 13, 9, 0, 0), - ymd_hms(1998, 1, 20, 9, 0, 0), - ymd_hms(1998, 1, 27, 9, 0, 0), - ymd_hms(1998, 3, 3, 9, 0, 0), - ymd_hms(1998, 3, 10, 9, 0, 0), - ], - ); - } - - #[test] - fn weekly_by_monthday() { - let mut options = ParsedOptions { - freq: Frequenzy::WEEKLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![1, 3], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 3, 9, 0, 0), - ymd_hms(1997, 10, 1, 9, 0, 0), - ymd_hms(1997, 10, 3, 9, 0, 0), - ], - ); - } - - #[test] - fn weekly_by_month_and_monthday() { - let mut options = ParsedOptions { - freq: Frequenzy::WEEKLY, - count: Some(3), - bymonth: vec![1, 3], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![5, 7], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 1, 5, 9, 0, 0), - ymd_hms(1998, 1, 7, 9, 0, 0), - ymd_hms(1998, 3, 5, 9, 0, 0), - ], - ); - } - - #[test] - fn weekly_by_weekday() { - let mut options = ParsedOptions { - freq: Frequenzy::WEEKLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![1, 3], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 0, 0), - ymd_hms(1997, 9, 4, 9, 0, 0), - ymd_hms(1997, 9, 9, 9, 0, 0), - ], - ); - } - - // ! why isnt this using nweekday ??? - #[test] - fn weekly_by_nweekday() { - let mut options = ParsedOptions { - freq: Frequenzy::WEEKLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![1, 3], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 0, 0), - ymd_hms(1997, 9, 4, 9, 0, 0), - ymd_hms(1997, 9, 9, 9, 0, 0), - ], - ); - } - - #[test] - fn weekly_by_month_and_weekday() { - let mut options = ParsedOptions { - freq: Frequenzy::WEEKLY, - count: Some(3), - bymonth: vec![1, 3], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![1, 3], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 1, 1, 9, 0, 0), - ymd_hms(1998, 1, 6, 9, 0, 0), - ymd_hms(1998, 1, 8, 9, 0, 0), - ], - ); - } - - #[test] - fn weekly_by_monthday_and_weekday() { - let mut options = ParsedOptions { - freq: Frequenzy::WEEKLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![1, 3], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![1, 3], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 1, 1, 9, 0, 0), - ymd_hms(1998, 2, 3, 9, 0, 0), - ymd_hms(1998, 3, 3, 9, 0, 0), - ], - ); - } - - #[test] - fn weekly_by_month_monthday_and_weekday() { - let mut options = ParsedOptions { - freq: Frequenzy::WEEKLY, - count: Some(3), - bymonth: vec![1, 3], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![1, 3], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![1, 3], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 1, 1, 9, 0, 0), - ymd_hms(1998, 3, 3, 9, 0, 0), - ymd_hms(2001, 3, 1, 9, 0, 0), - ], - ); - } - - #[test] - fn weekly_by_yearday() { - let mut options = ParsedOptions { - freq: Frequenzy::WEEKLY, - count: Some(4), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![1, 100, 200, 365], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 12, 31, 9, 0, 0), - ymd_hms(1998, 1, 1, 9, 0, 0), - ymd_hms(1998, 4, 10, 9, 0, 0), - ymd_hms(1998, 7, 19, 9, 0, 0), - ], - ); - } - - #[test] - fn weekly_by_yeardayneg() { - let mut options = ParsedOptions { - freq: Frequenzy::WEEKLY, - count: Some(4), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![-365, -266, -166, -1], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 12, 31, 9, 0, 0), - ymd_hms(1998, 1, 1, 9, 0, 0), - ymd_hms(1998, 4, 10, 9, 0, 0), - ymd_hms(1998, 7, 19, 9, 0, 0), - ], - ); - } - - #[test] - fn weekly_by_month_yearday() { - let mut options = ParsedOptions { - freq: Frequenzy::WEEKLY, - count: Some(4), - bymonth: vec![1, 7], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![1, 100, 200, 365], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 1, 1, 9, 0, 0), - ymd_hms(1998, 7, 19, 9, 0, 0), - ymd_hms(1999, 1, 1, 9, 0, 0), - ymd_hms(1999, 7, 19, 9, 0, 0), - ], - ); - } - - #[test] - fn weekly_by_weekno() { - let mut options = ParsedOptions { - freq: Frequenzy::WEEKLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![20], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 5, 11, 9, 0, 0), - ymd_hms(1998, 5, 12, 9, 0, 0), - ymd_hms(1998, 5, 13, 9, 0, 0), - ], - ); - } - - #[test] - fn weekly_by_weekno_and_weekday() { - let mut options = ParsedOptions { - freq: Frequenzy::WEEKLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![0], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![1], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 12, 29, 9, 0, 0), - ymd_hms(1999, 1, 4, 9, 0, 0), - ymd_hms(2000, 1, 3, 9, 0, 0), - ], - ); - } - - #[test] - fn weekly_by_weekno_and_weekday_large() { - let mut options = ParsedOptions { - freq: Frequenzy::WEEKLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![6], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![52], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 12, 28, 9, 0, 0), - ymd_hms(1998, 12, 27, 9, 0, 0), - ymd_hms(2000, 1, 2, 9, 0, 0), - ], - ); - } - - #[test] - fn weekly_by_weekno_and_weekday_last() { - let mut options = ParsedOptions { - freq: Frequenzy::WEEKLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![6], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![-1], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 12, 28, 9, 0, 0), - ymd_hms(1999, 1, 3, 9, 0, 0), - ymd_hms(2000, 1, 2, 9, 0, 0), - ], - ); - } - - #[test] - fn weekly_by_weekno_and_weekday53() { - let mut options = ParsedOptions { - freq: Frequenzy::WEEKLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![0], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![53], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 12, 28, 9, 0, 0), - ymd_hms(2004, 12, 27, 9, 0, 0), - ymd_hms(2009, 12, 28, 9, 0, 0), - ], - ); - } - - #[test] - fn weekly_by_hour() { - let mut options = ParsedOptions { - freq: Frequenzy::WEEKLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![1], - byhour: vec![6, 18], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 18, 0, 0), - ymd_hms(1997, 9, 9, 6, 0, 0), - ymd_hms(1997, 9, 9, 18, 0, 0), - ], - ); - } - - #[test] - fn weekly_by_minute() { - let mut options = ParsedOptions { - freq: Frequenzy::WEEKLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![1], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![6, 18], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 6, 0), - ymd_hms(1997, 9, 2, 9, 18, 0), - ymd_hms(1997, 9, 9, 9, 6, 0), - ], - ); - } - - #[test] - fn weekly_by_second() { - let mut options = ParsedOptions { - freq: Frequenzy::WEEKLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![1], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![6, 18], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 0, 6), - ymd_hms(1997, 9, 2, 9, 0, 18), - ymd_hms(1997, 9, 9, 9, 0, 6), - ], - ); - } - - #[test] - fn weekly_by_hour_and_minute() { - let mut options = ParsedOptions { - freq: Frequenzy::WEEKLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![1], - byhour: vec![6, 18], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![6, 18], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 18, 6, 0), - ymd_hms(1997, 9, 2, 18, 18, 0), - ymd_hms(1997, 9, 9, 6, 6, 0), - ], - ); - } - - #[test] - fn weekly_by_hour_and_second() { - let mut options = ParsedOptions { - freq: Frequenzy::WEEKLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![1], - byhour: vec![6, 18], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![6, 18], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 18, 0, 6), - ymd_hms(1997, 9, 2, 18, 0, 18), - ymd_hms(1997, 9, 9, 6, 0, 6), - ], - ); - } - - #[test] - fn weekly_by_minute_and_second() { - let mut options = ParsedOptions { - freq: Frequenzy::WEEKLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![1], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![6, 18], - bysecond: vec![6, 18], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 6, 6), - ymd_hms(1997, 9, 2, 9, 6, 18), - ymd_hms(1997, 9, 2, 9, 18, 6), - ], - ); - } - - #[test] - fn weekly_by_hour_and_minute_and_second() { - let mut options = ParsedOptions { - freq: Frequenzy::WEEKLY, - count: Some(5), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![1], - byhour: vec![6, 18], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![6, 18], - bysecond: vec![6, 18], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 18, 6, 6), - ymd_hms(1997, 9, 2, 18, 6, 18), - ymd_hms(1997, 9, 2, 18, 18, 6), - ymd_hms(1997, 9, 2, 18, 18, 18), - ymd_hms(1997, 9, 9, 6, 6, 6), - ], - ); - } - - #[test] - fn weekly_by_setpos() { - let mut options = ParsedOptions { - freq: Frequenzy::WEEKLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![1, 3], - byhour: vec![6, 18], - bysetpos: vec![3, -3], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 18, 0, 0), - ymd_hms(1997, 9, 4, 6, 0, 0), - ymd_hms(1997, 9, 9, 18, 0, 0), - ], - ); - } - - #[test] - fn daily() { - let mut options = ParsedOptions { - freq: Frequenzy::DAILY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 0, 0), - ymd_hms(1997, 9, 3, 9, 0, 0), - ymd_hms(1997, 9, 4, 9, 0, 0), - ], - ); - } - - #[test] - fn daily_interval() { - let mut options = ParsedOptions { - freq: Frequenzy::DAILY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 2, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 0, 0), - ymd_hms(1997, 9, 4, 9, 0, 0), - ymd_hms(1997, 9, 6, 9, 0, 0), - ], - ); - } - - #[test] - fn daily_interval_large() { - let mut options = ParsedOptions { - freq: Frequenzy::DAILY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 92, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 0, 0), - ymd_hms(1997, 12, 3, 9, 0, 0), - ymd_hms(1998, 3, 5, 9, 0, 0), - ], - ); - } - - #[test] - fn daily_by_month() { - let mut options = ParsedOptions { - freq: Frequenzy::DAILY, - count: Some(3), - bymonth: vec![1, 3], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 1, 1, 9, 0, 0), - ymd_hms(1998, 1, 2, 9, 0, 0), - ymd_hms(1998, 1, 3, 9, 0, 0), - ], - ); - } - - #[test] - fn daily_by_monthday() { - let mut options = ParsedOptions { - freq: Frequenzy::DAILY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![1, 3], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 3, 9, 0, 0), - ymd_hms(1997, 10, 1, 9, 0, 0), - ymd_hms(1997, 10, 3, 9, 0, 0), - ], - ); - } - - #[test] - fn daily_by_month_and_monthday() { - let mut options = ParsedOptions { - freq: Frequenzy::DAILY, - count: Some(3), - bymonth: vec![1, 3], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![5, 7], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 1, 5, 9, 0, 0), - ymd_hms(1998, 1, 7, 9, 0, 0), - ymd_hms(1998, 3, 5, 9, 0, 0), - ], - ); - } - - #[test] - fn daily_by_weekday() { - let mut options = ParsedOptions { - freq: Frequenzy::DAILY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![1, 3], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 0, 0), - ymd_hms(1997, 9, 4, 9, 0, 0), - ymd_hms(1997, 9, 9, 9, 0, 0), - ], - ); - } - - #[test] - fn daily_by_month_and_weekday() { - let mut options = ParsedOptions { - freq: Frequenzy::DAILY, - count: Some(3), - bymonth: vec![1, 3], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![1, 3], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 1, 1, 9, 0, 0), - ymd_hms(1998, 1, 6, 9, 0, 0), - ymd_hms(1998, 1, 8, 9, 0, 0), - ], - ); - } - - #[test] - fn daily_by_monthday_and_weekday() { - let mut options = ParsedOptions { - freq: Frequenzy::DAILY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![1, 3], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![1, 3], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 1, 1, 9, 0, 0), - ymd_hms(1998, 2, 3, 9, 0, 0), - ymd_hms(1998, 3, 3, 9, 0, 0), - ], - ); - } - - #[test] - fn daily_by_month_and_monthday_and_weekday() { - let mut options = ParsedOptions { - freq: Frequenzy::DAILY, - count: Some(3), - bymonth: vec![1, 3], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![1, 3], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![1, 3], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 1, 1, 9, 0, 0), - ymd_hms(1998, 3, 3, 9, 0, 0), - ymd_hms(2001, 3, 1, 9, 0, 0), - ], - ); - } - - #[test] - fn daily_by_yearday() { - let mut options = ParsedOptions { - freq: Frequenzy::DAILY, - count: Some(4), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![1, 100, 200, 365], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 12, 31, 9, 0, 0), - ymd_hms(1998, 1, 1, 9, 0, 0), - ymd_hms(1998, 4, 10, 9, 0, 0), - ymd_hms(1998, 7, 19, 9, 0, 0), - ], - ); - } - - #[test] - fn daily_by_yeardayneg() { - let mut options = ParsedOptions { - freq: Frequenzy::DAILY, - count: Some(4), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![-365, -266, -166, -1], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 12, 31, 9, 0, 0), - ymd_hms(1998, 1, 1, 9, 0, 0), - ymd_hms(1998, 4, 10, 9, 0, 0), - ymd_hms(1998, 7, 19, 9, 0, 0), - ], - ); - } - - #[test] - fn daily_by_month_and_yearday() { - let mut options = ParsedOptions { - freq: Frequenzy::DAILY, - count: Some(4), - bymonth: vec![1, 7], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![1, 100, 200, 365], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 1, 1, 9, 0, 0), - ymd_hms(1998, 7, 19, 9, 0, 0), - ymd_hms(1999, 1, 1, 9, 0, 0), - ymd_hms(1999, 7, 19, 9, 0, 0), - ], - ); - } - - #[test] - fn daily_by_weekno() { - let mut options = ParsedOptions { - freq: Frequenzy::DAILY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![20], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 5, 11, 9, 0, 0), - ymd_hms(1998, 5, 12, 9, 0, 0), - ymd_hms(1998, 5, 13, 9, 0, 0), - ], - ); - } - - // That's a nice one. The first days of week number one - // may be in the last year. - #[test] - fn daily_by_weekno_and_weekday() { - let mut options = ParsedOptions { - freq: Frequenzy::DAILY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![0], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![1], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 12, 29, 9, 0, 0), - ymd_hms(1999, 1, 4, 9, 0, 0), - ymd_hms(2000, 1, 3, 9, 0, 0), - ], - ); - } - - // Another nice test. The last days of week number 52/53 - // may be in the next year. - #[test] - fn daily_by_weekno_and_weekday_large() { - let mut options = ParsedOptions { - freq: Frequenzy::DAILY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![6], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![52], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 12, 28, 9, 0, 0), - ymd_hms(1998, 12, 27, 9, 0, 0), - ymd_hms(2000, 1, 2, 9, 0, 0), - ], - ); - } - - #[test] - fn daily_by_weekno_and_weekday_last() { - let mut options = ParsedOptions { - freq: Frequenzy::DAILY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![6], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![-1], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 12, 28, 9, 0, 0), - ymd_hms(1999, 1, 3, 9, 0, 0), - ymd_hms(2000, 1, 2, 9, 0, 0), - ], - ); - } - - #[test] - fn daily_by_weekno_and_weekday53() { - let mut options = ParsedOptions { - freq: Frequenzy::DAILY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![0], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![53], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 12, 28, 9, 0, 0), - ymd_hms(2004, 12, 27, 9, 0, 0), - ymd_hms(2009, 12, 28, 9, 0, 0), - ], - ); - } - - #[test] - fn daily_by_hour() { - let mut options = ParsedOptions { - freq: Frequenzy::DAILY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![6, 18], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 18, 0, 0), - ymd_hms(1997, 9, 3, 6, 0, 0), - ymd_hms(1997, 9, 3, 18, 0, 0), - ], - ); - } - - #[test] - fn daily_by_minute() { - let mut options = ParsedOptions { - freq: Frequenzy::DAILY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![6, 18], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 6, 0), - ymd_hms(1997, 9, 2, 9, 18, 0), - ymd_hms(1997, 9, 3, 9, 6, 0), - ], - ); - } - - #[test] - fn daily_by_second() { - let mut options = ParsedOptions { - freq: Frequenzy::DAILY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![6, 18], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 0, 6), - ymd_hms(1997, 9, 2, 9, 0, 18), - ymd_hms(1997, 9, 3, 9, 0, 6), - ], - ); - } - - #[test] - fn daily_by_hour_and_minute() { - let mut options = ParsedOptions { - freq: Frequenzy::DAILY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![6, 18], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![6, 18], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 18, 6, 0), - ymd_hms(1997, 9, 2, 18, 18, 0), - ymd_hms(1997, 9, 3, 6, 6, 0), - ], - ); - } - - #[test] - fn daily_by_hour_and_second() { - let mut options = ParsedOptions { - freq: Frequenzy::DAILY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![6, 18], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![6, 18], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 18, 0, 6), - ymd_hms(1997, 9, 2, 18, 0, 18), - ymd_hms(1997, 9, 3, 6, 0, 6), - ], - ); - } - - #[test] - fn daily_by_minute_and_second() { - let mut options = ParsedOptions { - freq: Frequenzy::DAILY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![6, 18], - bysecond: vec![6, 18], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 6, 6), - ymd_hms(1997, 9, 2, 9, 6, 18), - ymd_hms(1997, 9, 2, 9, 18, 6), - ], - ); - } - - #[test] - fn daily_by_hour_and_minute_and_second() { - let mut options = ParsedOptions { - freq: Frequenzy::DAILY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![6, 18], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![6, 18], - bysecond: vec![6, 18], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 18, 6, 6), - ymd_hms(1997, 9, 2, 18, 6, 18), - ymd_hms(1997, 9, 2, 18, 18, 6), - ], - ); - } - - #[test] - fn daily_by_setpos() { - let mut options = ParsedOptions { - freq: Frequenzy::DAILY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![6, 18], - bysetpos: vec![3, -3], - byweekno: vec![], - byminute: vec![15, 45], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 18, 15, 0), - ymd_hms(1997, 9, 3, 6, 45, 0), - ymd_hms(1997, 9, 3, 18, 15, 0), - ], - ); - } - - #[test] - fn hourly() { - let mut options = ParsedOptions { - freq: Frequenzy::HOURLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 0, 0), - ymd_hms(1997, 9, 2, 10, 0, 0), - ymd_hms(1997, 9, 2, 11, 0, 0), - ], - ); - } - - #[test] - fn hourly_interval() { - let mut options = ParsedOptions { - freq: Frequenzy::HOURLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 2, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 0, 0), - ymd_hms(1997, 9, 2, 11, 0, 0), - ymd_hms(1997, 9, 2, 13, 0, 0), - ], - ); - } - - #[test] - fn hourly_interval_large() { - let mut options = ParsedOptions { - freq: Frequenzy::HOURLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 769, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 0, 0), - ymd_hms(1997, 10, 4, 10, 0, 0), - ymd_hms(1997, 11, 5, 11, 0, 0), - ], - ); - } - - #[test] - fn hourly_by_month() { - let mut options = ParsedOptions { - freq: Frequenzy::HOURLY, - count: Some(3), - bymonth: vec![1, 3], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 1, 1, 0, 0, 0), - ymd_hms(1998, 1, 1, 1, 0, 0), - ymd_hms(1998, 1, 1, 2, 0, 0), - ], - ); - } - - #[test] - fn hourly_by_monthday() { - let mut options = ParsedOptions { - freq: Frequenzy::HOURLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![1, 3], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 3, 0, 0, 0), - ymd_hms(1997, 9, 3, 1, 0, 0), - ymd_hms(1997, 9, 3, 2, 0, 0), - ], - ); - } - - #[test] - fn hourly_by_month_and_monthday() { - let mut options = ParsedOptions { - freq: Frequenzy::HOURLY, - count: Some(3), - bymonth: vec![1, 3], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![5, 7], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 1, 5, 0, 0, 0), - ymd_hms(1998, 1, 5, 1, 0, 0), - ymd_hms(1998, 1, 5, 2, 0, 0), - ], - ); - } - - #[test] - fn hourly_by_weekday() { - let mut options = ParsedOptions { - freq: Frequenzy::HOURLY, - count: Some(5), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![1, 3], - byhour: vec![], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 5, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 0, 0), - ymd_hms(1997, 9, 2, 14, 0, 0), - ymd_hms(1997, 9, 2, 19, 0, 0), - ymd_hms(1997, 9, 4, 1, 0, 0), - ymd_hms(1997, 9, 4, 6, 0, 0), - ], - ); - } - - #[test] - fn hourly_by_month_and_weekday() { - let mut options = ParsedOptions { - freq: Frequenzy::HOURLY, - count: Some(3), - bymonth: vec![1, 3], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![1, 3], - byhour: vec![], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 1, 1, 0, 0, 0), - ymd_hms(1998, 1, 1, 1, 0, 0), - ymd_hms(1998, 1, 1, 2, 0, 0), - ], - ); - } - - #[test] - fn hourly_by_monthday_and_weekday() { - let mut options = ParsedOptions { - freq: Frequenzy::HOURLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![1, 3], - byhour: vec![], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![1, 3], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 1, 1, 0, 0, 0), - ymd_hms(1998, 1, 1, 1, 0, 0), - ymd_hms(1998, 1, 1, 2, 0, 0), - ], - ); - } - - #[test] - fn hourly_by_month_and_monthday_and_weekday() { - let mut options = ParsedOptions { - freq: Frequenzy::HOURLY, - count: Some(3), - bymonth: vec![1, 3], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![1, 3], - byhour: vec![], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![1, 3], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 1, 1, 0, 0, 0), - ymd_hms(1998, 1, 1, 1, 0, 0), - ymd_hms(1998, 1, 1, 2, 0, 0), - ], - ); - } - - #[test] - fn hourly_by_yearday() { - let mut options = ParsedOptions { - freq: Frequenzy::HOURLY, - count: Some(8), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![1, 100, 200, 365], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 12, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 12, 31, 9, 0, 0), - ymd_hms(1997, 12, 31, 21, 0, 0), - ymd_hms(1998, 1, 1, 9, 0, 0), - ymd_hms(1998, 1, 1, 21, 0, 0), - ymd_hms(1998, 4, 10, 9, 0, 0), - ymd_hms(1998, 4, 10, 21, 0, 0), - ymd_hms(1998, 7, 19, 9, 0, 0), - ymd_hms(1998, 7, 19, 21, 0, 0), - ], - ); - } - - #[test] - fn hourly_by_yeardayneg() { - let mut options = ParsedOptions { - freq: Frequenzy::HOURLY, - count: Some(8), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![-365, -266, -166, -1], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 12, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 12, 31, 9, 0, 0), - ymd_hms(1997, 12, 31, 21, 0, 0), - ymd_hms(1998, 1, 1, 9, 0, 0), - ymd_hms(1998, 1, 1, 21, 0, 0), - ymd_hms(1998, 4, 10, 9, 0, 0), - ymd_hms(1998, 4, 10, 21, 0, 0), - ymd_hms(1998, 7, 19, 9, 0, 0), - ymd_hms(1998, 7, 19, 21, 0, 0), - ], - ); - } - - #[test] - fn hourly_by_month_and_yearday() { - let mut options = ParsedOptions { - freq: Frequenzy::HOURLY, - count: Some(4), - bymonth: vec![4, 7], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![1, 100, 200, 365], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 4, 10, 0, 0, 0), - ymd_hms(1998, 4, 10, 1, 0, 0), - ymd_hms(1998, 4, 10, 2, 0, 0), - ymd_hms(1998, 4, 10, 3, 0, 0), - ], - ); - } - - #[test] - fn hourly_by_weekno() { - let mut options = ParsedOptions { - freq: Frequenzy::HOURLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![], - bysetpos: vec![], - byweekno: vec![20], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 5, 11, 0, 0, 0), - ymd_hms(1998, 5, 11, 1, 0, 0), - ymd_hms(1998, 5, 11, 2, 0, 0), - ], - ); - } - - #[test] - fn hourly_by_weekno_and_weekday() { - let mut options = ParsedOptions { - freq: Frequenzy::HOURLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![0], - byhour: vec![], - bysetpos: vec![], - byweekno: vec![1], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 12, 29, 0, 0, 0), - ymd_hms(1997, 12, 29, 1, 0, 0), - ymd_hms(1997, 12, 29, 2, 0, 0), - ], - ); - } - - #[test] - fn hourly_by_weekno_and_weekday_large() { - let mut options = ParsedOptions { - freq: Frequenzy::HOURLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![6], - byhour: vec![], - bysetpos: vec![], - byweekno: vec![52], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 12, 28, 0, 0, 0), - ymd_hms(1997, 12, 28, 1, 0, 0), - ymd_hms(1997, 12, 28, 2, 0, 0), - ], - ); - } - - #[test] - fn hourly_by_weekno_and_weekday_last() { - let mut options = ParsedOptions { - freq: Frequenzy::HOURLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![6], - byhour: vec![], - bysetpos: vec![], - byweekno: vec![-1], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 12, 28, 0, 0, 0), - ymd_hms(1997, 12, 28, 1, 0, 0), - ymd_hms(1997, 12, 28, 2, 0, 0), - ], - ); - } - - #[test] - fn hourly_by_weekno_and_weekday53() { - let mut options = ParsedOptions { - freq: Frequenzy::HOURLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![0], - byhour: vec![], - bysetpos: vec![], - byweekno: vec![53], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1998, 12, 28, 0, 0, 0), - ymd_hms(1998, 12, 28, 1, 0, 0), - ymd_hms(1998, 12, 28, 2, 0, 0), - ], - ); - } - - #[test] - fn hourly_by_hour() { - let mut options = ParsedOptions { - freq: Frequenzy::HOURLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![6, 18], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 18, 0, 0), - ymd_hms(1997, 9, 3, 6, 0, 0), - ymd_hms(1997, 9, 3, 18, 0, 0), - ], - ); - } - - #[test] - fn hourly_by_minute() { - let mut options = ParsedOptions { - freq: Frequenzy::HOURLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![6, 18], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 6, 0), - ymd_hms(1997, 9, 2, 9, 18, 0), - ymd_hms(1997, 9, 2, 10, 6, 0), - ], - ); - } - - #[test] - fn hourly_by_second() { - let mut options = ParsedOptions { - freq: Frequenzy::HOURLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![6, 18], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 0, 6), - ymd_hms(1997, 9, 2, 9, 0, 18), - ymd_hms(1997, 9, 2, 10, 0, 6), - ], - ); - } - - #[test] - fn hourly_by_hour_and_minute() { - let mut options = ParsedOptions { - freq: Frequenzy::HOURLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![6, 18], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![6, 18], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 18, 6, 0), - ymd_hms(1997, 9, 2, 18, 18, 0), - ymd_hms(1997, 9, 3, 6, 6, 0), - ], - ); - } - - #[test] - fn hourly_by_hour_and_second() { - let mut options = ParsedOptions { - freq: Frequenzy::HOURLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![6, 18], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![6, 18], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 18, 0, 6), - ymd_hms(1997, 9, 2, 18, 0, 18), - ymd_hms(1997, 9, 3, 6, 0, 6), - ], - ); - } - - #[test] - fn hourly_by_minute_and_second() { - let mut options = ParsedOptions { - freq: Frequenzy::HOURLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![6, 18], - bysecond: vec![6, 18], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 6, 6), - ymd_hms(1997, 9, 2, 9, 6, 18), - ymd_hms(1997, 9, 2, 9, 18, 6), - ], - ); - } - - #[test] - fn hourly_by_hour_and_minute_and_second() { - let mut options = ParsedOptions { - freq: Frequenzy::HOURLY, - count: Some(5), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![6, 18], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![6, 18], - bysecond: vec![6, 18], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 18, 6, 6), - ymd_hms(1997, 9, 2, 18, 6, 18), - ymd_hms(1997, 9, 2, 18, 18, 6), - ymd_hms(1997, 9, 2, 18, 18, 18), - ymd_hms(1997, 9, 3, 6, 6, 6), - ], - ); - } - - #[test] - fn hourly_by_setpos() { - let mut options = ParsedOptions { - freq: Frequenzy::HOURLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - byweekday: vec![], - byhour: vec![], - bysetpos: vec![3, -3], - byweekno: vec![], - byminute: vec![15, 45], - bysecond: vec![15, 45], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - until: None, - wkst: 0, - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 15, 45), - ymd_hms(1997, 9, 2, 9, 45, 15), - ymd_hms(1997, 9, 2, 10, 15, 45), - ], - ); - } - - #[test] - fn until_not_matching() { - let mut options = ParsedOptions { - freq: Frequenzy::DAILY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - until: Some(ymd_hms(1997, 9, 5, 8, 0, 0)), - wkst: 0, - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 0, 0), - ymd_hms(1997, 9, 3, 9, 0, 0), - ymd_hms(1997, 9, 4, 9, 0, 0), - ], - ); - } - - #[test] - fn until_matching() { - let mut options = ParsedOptions { - freq: Frequenzy::DAILY, - count: Some(4), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - until: Some(ymd_hms(1997, 9, 4, 9, 0, 0)), - wkst: 0, - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 0, 0), - ymd_hms(1997, 9, 3, 9, 0, 0), - ymd_hms(1997, 9, 4, 9, 0, 0), - ], - ); - } - - #[test] - fn until_single() { - let mut options = ParsedOptions { - freq: Frequenzy::DAILY, - count: Some(1), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - until: Some(ymd_hms(1997, 9, 2, 9, 0, 0)), - wkst: 0, - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - tzid: None, - interval: 1, - }; - test_recurring(&mut options, &vec![ymd_hms(1997, 9, 2, 9, 0, 0)]); - } - - #[test] - fn until_empty() { - let mut options = ParsedOptions { - freq: Frequenzy::DAILY, - count: Some(1), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - until: Some(ymd_hms(1997, 9, 1, 9, 0, 0)), - wkst: 0, - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - tzid: None, - interval: 1, - }; - test_recurring(&mut options, &vec![]); - } - - #[test] - fn until_with_date() { - let mut options = ParsedOptions { - freq: Frequenzy::DAILY, - count: Some(4), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - until: Some(ymd_hms(1997, 9, 5, 0, 0, 0)), - wkst: 0, - byweekday: vec![], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - tzid: None, - interval: 1, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 0, 0), - ymd_hms(1997, 9, 3, 9, 0, 0), - ymd_hms(1997, 9, 4, 9, 0, 0), - ], - ); - } - - #[test] - fn wkst_interval_mo() { - let mut options = ParsedOptions { - freq: Frequenzy::WEEKLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - until: None, - wkst: 0, - byweekday: vec![1, 6], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - tzid: None, - interval: 2, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 0, 0), - ymd_hms(1997, 9, 7, 9, 0, 0), - ymd_hms(1997, 9, 16, 9, 0, 0), - ], - ); - } - - #[test] - fn wkst_interval_su() { - let mut options = ParsedOptions { - freq: Frequenzy::WEEKLY, - count: Some(3), - bymonth: vec![], - dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), - until: None, - wkst: 6, - byweekday: vec![1, 6], - byhour: vec![9], - bysetpos: vec![], - byweekno: vec![], - byminute: vec![0], - bysecond: vec![0], - byyearday: vec![], - bymonthday: vec![], - bynweekday: vec![], - bynmonthday: vec![], - tzid: None, - interval: 2, - }; - test_recurring( - &mut options, - &vec![ - ymd_hms(1997, 9, 2, 9, 0, 0), - ymd_hms(1997, 9, 14, 9, 0, 0), - ymd_hms(1997, 9, 16, 9, 0, 0), - ], - ); - } + byeaster: Some(0), + }; + test_recurring( + &mut options, + &vec![ + ymd_hms(1998, 4, 12, 9, 0, 0), + ymd_hms(1999, 4, 4, 9, 0, 0), + ymd_hms(2000, 4, 23, 9, 0, 0), + ], + ); + } + + //#[test] + //fn yearly_by_month() { + //let mut options = ParsedOptions { + //freq: Frequenzy::YEARLY, + //count: Some(3), + //bymonth: vec![1, 3], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![2], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 1, 2, 9, 0, 0), + //ymd_hms(1998, 3, 2, 9, 0, 0), + //ymd_hms(1999, 1, 2, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn yearly_by_monthday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::YEARLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![1, 3], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 3, 9, 0, 0), + //ymd_hms(1997, 10, 1, 9, 0, 0), + //ymd_hms(1997, 10, 3, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn yearly_by_month_and_monthday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::YEARLY, + //count: Some(3), + //bymonth: vec![1, 3], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![5, 7], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 1, 5, 9, 0, 0), + //ymd_hms(1998, 1, 7, 9, 0, 0), + //ymd_hms(1998, 3, 5, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn yearly_by_weekday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::YEARLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![1, 3], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 0, 0), + //ymd_hms(1997, 9, 4, 9, 0, 0), + //ymd_hms(1997, 9, 9, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn yearly_by_nweekday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::YEARLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![vec![1, 1], vec![3, -1]], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 12, 25, 9, 0, 0), + //ymd_hms(1998, 1, 6, 9, 0, 0), + //ymd_hms(1998, 12, 31, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn yearly_by_nweekday_large() { + //let mut options = ParsedOptions { + //freq: Frequenzy::YEARLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![vec![1, 13], vec![3, -13]], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 10, 2, 9, 0, 0), + //ymd_hms(1998, 3, 31, 9, 0, 0), + //ymd_hms(1998, 10, 8, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn yearly_by_month_and_weekday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::YEARLY, + //count: Some(3), + //bymonth: vec![1, 3], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![1, 3], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 1, 1, 9, 0, 0), + //ymd_hms(1998, 1, 6, 9, 0, 0), + //ymd_hms(1998, 1, 8, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn yearly_by_month_and_nweekday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::YEARLY, + //count: Some(3), + //bymonth: vec![1, 3], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![vec![1, 1], vec![3, -1]], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 1, 6, 9, 0, 0), + //ymd_hms(1998, 1, 29, 9, 0, 0), + //ymd_hms(1998, 3, 3, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn yearly_by_month_and_nweekday_large() { + //let mut options = ParsedOptions { + //freq: Frequenzy::YEARLY, + //count: Some(3), + //bymonth: vec![1, 3], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![vec![1, 3], vec![3, -3]], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 1, 15, 9, 0, 0), + //ymd_hms(1998, 1, 20, 9, 0, 0), + //ymd_hms(1998, 3, 12, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn yearly_by_monthday_and_weekday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::YEARLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![1, 3], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![1, 3], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 1, 1, 9, 0, 0), + //ymd_hms(1998, 2, 3, 9, 0, 0), + //ymd_hms(1998, 3, 3, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn yearly_by_month_and_monthday_and_weekday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::YEARLY, + //count: Some(3), + //bymonth: vec![1, 3], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![1, 3], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![1, 3], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 1, 1, 9, 0, 0), + //ymd_hms(1998, 3, 3, 9, 0, 0), + //ymd_hms(2001, 3, 1, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn yearly_by_yearday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::YEARLY, + //count: Some(4), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![1, 100, 200, 365], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 12, 31, 9, 0, 0), + //ymd_hms(1998, 1, 1, 9, 0, 0), + //ymd_hms(1998, 4, 10, 9, 0, 0), + //ymd_hms(1998, 7, 19, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn yearly_by_yeardayneg() { + //let mut options = ParsedOptions { + //freq: Frequenzy::YEARLY, + //count: Some(4), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![-365, -266, -166, -1], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 12, 31, 9, 0, 0), + //ymd_hms(1998, 1, 1, 9, 0, 0), + //ymd_hms(1998, 4, 10, 9, 0, 0), + //ymd_hms(1998, 7, 19, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn yearly_by_month_and_yearday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::YEARLY, + //count: Some(4), + //bymonth: vec![4, 7], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![1, 100, 200, 365], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 4, 10, 9, 0, 0), + //ymd_hms(1998, 7, 19, 9, 0, 0), + //ymd_hms(1999, 4, 10, 9, 0, 0), + //ymd_hms(1999, 7, 19, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn yearly_by_weekno() { + //let mut options = ParsedOptions { + //freq: Frequenzy::YEARLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![20], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 5, 11, 9, 0, 0), + //ymd_hms(1998, 5, 12, 9, 0, 0), + //ymd_hms(1998, 5, 13, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn yearly_by_weekno_and_weekday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::YEARLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![0], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![1], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 12, 29, 9, 0, 0), + //ymd_hms(1999, 1, 4, 9, 0, 0), + //ymd_hms(2000, 1, 3, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn yearly_by_weekno_and_weekday_large() { + //let mut options = ParsedOptions { + //freq: Frequenzy::YEARLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![6], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![52], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 12, 28, 9, 0, 0), + //ymd_hms(1998, 12, 27, 9, 0, 0), + //ymd_hms(2000, 1, 2, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn yearly_by_weekno_and_weekday_last() { + //let mut options = ParsedOptions { + //freq: Frequenzy::YEARLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![6], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![-1], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 12, 28, 9, 0, 0), + //ymd_hms(1999, 1, 3, 9, 0, 0), + //ymd_hms(2000, 1, 2, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn yearly_by_weekno_and_weekday53_last() { + //let mut options = ParsedOptions { + //freq: Frequenzy::YEARLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![0], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![53], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 12, 28, 9, 0, 0), + //ymd_hms(2004, 12, 27, 9, 0, 0), + //ymd_hms(2009, 12, 28, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn yearly_by_hour() { + //let mut options = ParsedOptions { + //freq: Frequenzy::YEARLY, + //count: Some(3), + //bymonth: vec![9], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![6, 18], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![2], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 18, 0, 0), + //ymd_hms(1998, 9, 2, 6, 0, 0), + //ymd_hms(1998, 9, 2, 18, 0, 0), + //], + //); + //} + + //#[test] + //fn yearly_by_minute() { + //let mut options = ParsedOptions { + //freq: Frequenzy::YEARLY, + //count: Some(3), + //bymonth: vec![9], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![6, 18], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![2], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 6, 0), + //ymd_hms(1997, 9, 2, 9, 18, 0), + //ymd_hms(1998, 9, 2, 9, 6, 0), + //], + //); + //} + + //#[test] + //fn yearly_by_second() { + //let mut options = ParsedOptions { + //freq: Frequenzy::YEARLY, + //count: Some(3), + //bymonth: vec![9], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![6, 18], + //byyearday: vec![], + //bymonthday: vec![2], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 0, 6), + //ymd_hms(1997, 9, 2, 9, 0, 18), + //ymd_hms(1998, 9, 2, 9, 0, 6), + //], + //); + //} + + //#[test] + //fn yearly_by_hour_and_minute() { + //let mut options = ParsedOptions { + //freq: Frequenzy::YEARLY, + //count: Some(3), + //bymonth: vec![9], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![6, 18], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![6, 18], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![2], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 18, 6, 0), + //ymd_hms(1997, 9, 2, 18, 18, 0), + //ymd_hms(1998, 9, 2, 6, 6, 0), + //], + //); + //} + + //#[test] + //fn yearly_by_hour_and_second() { + //let mut options = ParsedOptions { + //freq: Frequenzy::YEARLY, + //count: Some(3), + //bymonth: vec![9], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![6, 18], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![6, 18], + //byyearday: vec![], + //bymonthday: vec![2], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 18, 0, 6), + //ymd_hms(1997, 9, 2, 18, 0, 18), + //ymd_hms(1998, 9, 2, 6, 0, 6), + //], + //); + //} + + //#[test] + //fn yearly_by_minute_and_second() { + //let mut options = ParsedOptions { + //freq: Frequenzy::YEARLY, + //count: Some(3), + //bymonth: vec![9], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![6, 18], + //bysecond: vec![6, 18], + //byyearday: vec![], + //bymonthday: vec![2], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 6, 6), + //ymd_hms(1997, 9, 2, 9, 6, 18), + //ymd_hms(1997, 9, 2, 9, 18, 6), + //], + //); + //} + + //#[test] + //fn yearly_by_hour_and_minute_and_second() { + //let mut options = ParsedOptions { + //freq: Frequenzy::YEARLY, + //count: Some(3), + //bymonth: vec![9], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![6, 18], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![6, 18], + //bysecond: vec![6, 18], + //byyearday: vec![], + //bymonthday: vec![2], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 18, 6, 6), + //ymd_hms(1997, 9, 2, 18, 6, 18), + //ymd_hms(1997, 9, 2, 18, 18, 6), + //], + //); + //} + + //#[test] + //fn yearly_by_setpos() { + //let mut options = ParsedOptions { + //freq: Frequenzy::YEARLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![6, 18], + //bysetpos: vec![3, -3], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![15], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 11, 15, 18, 0, 0), + //ymd_hms(1998, 2, 15, 6, 0, 0), + //ymd_hms(1998, 11, 15, 18, 0, 0), + //], + //); + //} + + //#[test] + //fn monthly() { + //let mut options = ParsedOptions { + //freq: Frequenzy::MONTHLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![2], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 0, 0), + //ymd_hms(1997, 10, 2, 9, 0, 0), + //ymd_hms(1997, 11, 2, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn monthly_interval() { + //let mut options = ParsedOptions { + //freq: Frequenzy::MONTHLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![2], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 2, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 0, 0), + //ymd_hms(1997, 11, 2, 9, 0, 0), + //ymd_hms(1998, 1, 2, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn monthly_interval_large() { + //let mut options = ParsedOptions { + //freq: Frequenzy::MONTHLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![2], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 18, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 0, 0), + //ymd_hms(1999, 3, 2, 9, 0, 0), + //ymd_hms(2000, 9, 2, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn monthly_by_month() { + //let mut options = ParsedOptions { + //freq: Frequenzy::MONTHLY, + //count: Some(3), + //bymonth: vec![1, 3], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![2], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 1, 2, 9, 0, 0), + //ymd_hms(1998, 3, 2, 9, 0, 0), + //ymd_hms(1999, 1, 2, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn monthly_by_monthday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::MONTHLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![1, 3], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 3, 9, 0, 0), + //ymd_hms(1997, 10, 1, 9, 0, 0), + //ymd_hms(1997, 10, 3, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn monthly_by_month_and_monthday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::MONTHLY, + //count: Some(3), + //bymonth: vec![1, 3], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![5, 7], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 1, 5, 9, 0, 0), + //ymd_hms(1998, 1, 7, 9, 0, 0), + //ymd_hms(1998, 3, 5, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn monthly_by_weekday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::MONTHLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![1, 3], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 0, 0), + //ymd_hms(1997, 9, 4, 9, 0, 0), + //ymd_hms(1997, 9, 9, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn monthly_by_nweekday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::MONTHLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![vec![1, 1], vec![3, -1]], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 0, 0), + //ymd_hms(1997, 9, 25, 9, 0, 0), + //ymd_hms(1997, 10, 7, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn monthly_by_nweekday_large() { + //let mut options = ParsedOptions { + //freq: Frequenzy::MONTHLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![vec![1, 3], vec![3, -3]], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 11, 9, 0, 0), + //ymd_hms(1997, 9, 16, 9, 0, 0), + //ymd_hms(1997, 10, 16, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn monthly_by_month_and_weekday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::MONTHLY, + //count: Some(3), + //bymonth: vec![1, 3], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![1, 3], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 1, 1, 9, 0, 0), + //ymd_hms(1998, 1, 6, 9, 0, 0), + //ymd_hms(1998, 1, 8, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn monthly_by_month_and_nweekday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::MONTHLY, + //count: Some(3), + //bymonth: vec![1, 3], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![vec![1, 1], vec![3, -1]], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 1, 6, 9, 0, 0), + //ymd_hms(1998, 1, 29, 9, 0, 0), + //ymd_hms(1998, 3, 3, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn monthly_by_month_and_nweekday_large() { + //let mut options = ParsedOptions { + //freq: Frequenzy::MONTHLY, + //count: Some(3), + //bymonth: vec![1, 3], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![vec![1, 3], vec![3, -3]], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 1, 15, 9, 0, 0), + //ymd_hms(1998, 1, 20, 9, 0, 0), + //ymd_hms(1998, 3, 12, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn monthly_by_monthday_and_weekday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::MONTHLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![1, 3], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![1, 3], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 1, 1, 9, 0, 0), + //ymd_hms(1998, 2, 3, 9, 0, 0), + //ymd_hms(1998, 3, 3, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn monthly_by_month_and_monthday_and_weekday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::MONTHLY, + //count: Some(3), + //bymonth: vec![1, 3], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![1, 3], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![1, 3], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 1, 1, 9, 0, 0), + //ymd_hms(1998, 3, 3, 9, 0, 0), + //ymd_hms(2001, 3, 1, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn monthly_by_yearday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::MONTHLY, + //count: Some(4), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![1, 100, 200, 365], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 12, 31, 9, 0, 0), + //ymd_hms(1998, 1, 1, 9, 0, 0), + //ymd_hms(1998, 4, 10, 9, 0, 0), + //ymd_hms(1998, 7, 19, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn monthly_by_yeardayneg() { + //let mut options = ParsedOptions { + //freq: Frequenzy::MONTHLY, + //count: Some(4), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![-365, -266, -166, -1], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 12, 31, 9, 0, 0), + //ymd_hms(1998, 1, 1, 9, 0, 0), + //ymd_hms(1998, 4, 10, 9, 0, 0), + //ymd_hms(1998, 7, 19, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn monthly_by_month_and_yearday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::MONTHLY, + //count: Some(4), + //bymonth: vec![4, 7], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![1, 100, 200, 365], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 4, 10, 9, 0, 0), + //ymd_hms(1998, 7, 19, 9, 0, 0), + //ymd_hms(1999, 4, 10, 9, 0, 0), + //ymd_hms(1999, 7, 19, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn monthly_by_weekno() { + //let mut options = ParsedOptions { + //freq: Frequenzy::MONTHLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![20], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 5, 11, 9, 0, 0), + //ymd_hms(1998, 5, 12, 9, 0, 0), + //ymd_hms(1998, 5, 13, 9, 0, 0), + //], + //); + //} + + //// That's a nice one. The first days of week number one + //// may be in the last year. + //#[test] + //fn monthly_by_weekno_and_weekday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::MONTHLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![0], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![1], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 12, 29, 9, 0, 0), + //ymd_hms(1999, 1, 4, 9, 0, 0), + //ymd_hms(2000, 1, 3, 9, 0, 0), + //], + //); + //} + + //// Another nice test. The last days of week number 52/53 + //// may be in the next year. + //#[test] + //fn monthly_by_weekno_and_weekday_large() { + //let mut options = ParsedOptions { + //freq: Frequenzy::MONTHLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![6], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![52], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 12, 28, 9, 0, 0), + //ymd_hms(1998, 12, 27, 9, 0, 0), + //ymd_hms(2000, 1, 2, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn monthly_by_weekno_and_weekday_last() { + //let mut options = ParsedOptions { + //freq: Frequenzy::MONTHLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![6], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![-1], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 12, 28, 9, 0, 0), + //ymd_hms(1999, 1, 3, 9, 0, 0), + //ymd_hms(2000, 1, 2, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn monthly_by_weekno_and_weekday53() { + //let mut options = ParsedOptions { + //freq: Frequenzy::MONTHLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![0], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![53], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 12, 28, 9, 0, 0), + //ymd_hms(2004, 12, 27, 9, 0, 0), + //ymd_hms(2009, 12, 28, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn monthly_by_hour() { + //let mut options = ParsedOptions { + //freq: Frequenzy::MONTHLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![6, 18], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![2], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 18, 0, 0), + //ymd_hms(1997, 10, 2, 6, 0, 0), + //ymd_hms(1997, 10, 2, 18, 0, 0), + //], + //); + //} + + //#[test] + //fn monthly_by_minute() { + //let mut options = ParsedOptions { + //freq: Frequenzy::MONTHLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![6, 18], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![2], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 6, 0), + //ymd_hms(1997, 9, 2, 9, 18, 0), + //ymd_hms(1997, 10, 2, 9, 6, 0), + //], + //); + //} + + //#[test] + //fn monthly_by_second() { + //let mut options = ParsedOptions { + //freq: Frequenzy::MONTHLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![6, 18], + //byyearday: vec![], + //bymonthday: vec![2], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 0, 6), + //ymd_hms(1997, 9, 2, 9, 0, 18), + //ymd_hms(1997, 10, 2, 9, 0, 6), + //], + //); + //} + + //#[test] + //fn monthly_by_hour_and_minute() { + //let mut options = ParsedOptions { + //freq: Frequenzy::MONTHLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![6, 18], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![6, 18], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![2], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 18, 6, 0), + //ymd_hms(1997, 9, 2, 18, 18, 0), + //ymd_hms(1997, 10, 2, 6, 6, 0), + //], + //); + //} + + //#[test] + //fn monthly_by_hour_and_second() { + //let mut options = ParsedOptions { + //freq: Frequenzy::MONTHLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![6, 18], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![6, 18], + //byyearday: vec![], + //bymonthday: vec![2], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 18, 0, 6), + //ymd_hms(1997, 9, 2, 18, 0, 18), + //ymd_hms(1997, 10, 2, 6, 0, 6), + //], + //); + //} + + //#[test] + //fn monthly_by_minute_and_second() { + //let mut options = ParsedOptions { + //freq: Frequenzy::MONTHLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![6, 18], + //bysecond: vec![6, 18], + //byyearday: vec![], + //bymonthday: vec![2], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 6, 6), + //ymd_hms(1997, 9, 2, 9, 6, 18), + //ymd_hms(1997, 9, 2, 9, 18, 6), + //], + //); + //} + + //#[test] + //fn monthly_by_hour_and_minute_and_second() { + //let mut options = ParsedOptions { + //freq: Frequenzy::MONTHLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![6, 18], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![6, 18], + //bysecond: vec![6, 18], + //byyearday: vec![], + //bymonthday: vec![2], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 18, 6, 6), + //ymd_hms(1997, 9, 2, 18, 6, 18), + //ymd_hms(1997, 9, 2, 18, 18, 6), + //], + //); + //} + + //#[test] + //fn monthly_by_setpos() { + //let mut options = ParsedOptions { + //freq: Frequenzy::MONTHLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![6, 18], + //bysetpos: vec![3, -3], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![13, 17], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 13, 18, 0, 0), + //ymd_hms(1997, 9, 17, 6, 0, 0), + //ymd_hms(1997, 10, 13, 18, 0, 0), + //], + //); + //} + + //#[test] + //fn weekly() { + //let mut options = ParsedOptions { + //freq: Frequenzy::WEEKLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![1], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 0, 0), + //ymd_hms(1997, 9, 9, 9, 0, 0), + //ymd_hms(1997, 9, 16, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn weekly_interval() { + //let mut options = ParsedOptions { + //freq: Frequenzy::WEEKLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![1], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 2, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 0, 0), + //ymd_hms(1997, 9, 16, 9, 0, 0), + //ymd_hms(1997, 9, 30, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn weekly_interval_large() { + //let mut options = ParsedOptions { + //freq: Frequenzy::WEEKLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![1], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 20, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 0, 0), + //ymd_hms(1998, 1, 20, 9, 0, 0), + //ymd_hms(1998, 6, 9, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn weekly_by_month() { + //let mut options = ParsedOptions { + //freq: Frequenzy::WEEKLY, + //count: Some(6), + //bymonth: vec![1, 3], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![1], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 1, 6, 9, 0, 0), + //ymd_hms(1998, 1, 13, 9, 0, 0), + //ymd_hms(1998, 1, 20, 9, 0, 0), + //ymd_hms(1998, 1, 27, 9, 0, 0), + //ymd_hms(1998, 3, 3, 9, 0, 0), + //ymd_hms(1998, 3, 10, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn weekly_by_monthday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::WEEKLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![1, 3], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 3, 9, 0, 0), + //ymd_hms(1997, 10, 1, 9, 0, 0), + //ymd_hms(1997, 10, 3, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn weekly_by_month_and_monthday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::WEEKLY, + //count: Some(3), + //bymonth: vec![1, 3], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![5, 7], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 1, 5, 9, 0, 0), + //ymd_hms(1998, 1, 7, 9, 0, 0), + //ymd_hms(1998, 3, 5, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn weekly_by_weekday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::WEEKLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![1, 3], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 0, 0), + //ymd_hms(1997, 9, 4, 9, 0, 0), + //ymd_hms(1997, 9, 9, 9, 0, 0), + //], + //); + //} + + //// ! why isnt this using nweekday ??? + //#[test] + //fn weekly_by_nweekday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::WEEKLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![1, 3], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 0, 0), + //ymd_hms(1997, 9, 4, 9, 0, 0), + //ymd_hms(1997, 9, 9, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn weekly_by_month_and_weekday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::WEEKLY, + //count: Some(3), + //bymonth: vec![1, 3], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![1, 3], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 1, 1, 9, 0, 0), + //ymd_hms(1998, 1, 6, 9, 0, 0), + //ymd_hms(1998, 1, 8, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn weekly_by_monthday_and_weekday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::WEEKLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![1, 3], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![1, 3], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 1, 1, 9, 0, 0), + //ymd_hms(1998, 2, 3, 9, 0, 0), + //ymd_hms(1998, 3, 3, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn weekly_by_month_monthday_and_weekday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::WEEKLY, + //count: Some(3), + //bymonth: vec![1, 3], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![1, 3], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![1, 3], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 1, 1, 9, 0, 0), + //ymd_hms(1998, 3, 3, 9, 0, 0), + //ymd_hms(2001, 3, 1, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn weekly_by_yearday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::WEEKLY, + //count: Some(4), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![1, 100, 200, 365], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 12, 31, 9, 0, 0), + //ymd_hms(1998, 1, 1, 9, 0, 0), + //ymd_hms(1998, 4, 10, 9, 0, 0), + //ymd_hms(1998, 7, 19, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn weekly_by_yeardayneg() { + //let mut options = ParsedOptions { + //freq: Frequenzy::WEEKLY, + //count: Some(4), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![-365, -266, -166, -1], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 12, 31, 9, 0, 0), + //ymd_hms(1998, 1, 1, 9, 0, 0), + //ymd_hms(1998, 4, 10, 9, 0, 0), + //ymd_hms(1998, 7, 19, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn weekly_by_month_yearday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::WEEKLY, + //count: Some(4), + //bymonth: vec![1, 7], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![1, 100, 200, 365], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 1, 1, 9, 0, 0), + //ymd_hms(1998, 7, 19, 9, 0, 0), + //ymd_hms(1999, 1, 1, 9, 0, 0), + //ymd_hms(1999, 7, 19, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn weekly_by_weekno() { + //let mut options = ParsedOptions { + //freq: Frequenzy::WEEKLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![20], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 5, 11, 9, 0, 0), + //ymd_hms(1998, 5, 12, 9, 0, 0), + //ymd_hms(1998, 5, 13, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn weekly_by_weekno_and_weekday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::WEEKLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![0], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![1], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 12, 29, 9, 0, 0), + //ymd_hms(1999, 1, 4, 9, 0, 0), + //ymd_hms(2000, 1, 3, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn weekly_by_weekno_and_weekday_large() { + //let mut options = ParsedOptions { + //freq: Frequenzy::WEEKLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![6], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![52], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 12, 28, 9, 0, 0), + //ymd_hms(1998, 12, 27, 9, 0, 0), + //ymd_hms(2000, 1, 2, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn weekly_by_weekno_and_weekday_last() { + //let mut options = ParsedOptions { + //freq: Frequenzy::WEEKLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![6], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![-1], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 12, 28, 9, 0, 0), + //ymd_hms(1999, 1, 3, 9, 0, 0), + //ymd_hms(2000, 1, 2, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn weekly_by_weekno_and_weekday53() { + //let mut options = ParsedOptions { + //freq: Frequenzy::WEEKLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![0], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![53], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 12, 28, 9, 0, 0), + //ymd_hms(2004, 12, 27, 9, 0, 0), + //ymd_hms(2009, 12, 28, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn weekly_by_hour() { + //let mut options = ParsedOptions { + //freq: Frequenzy::WEEKLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![1], + //byhour: vec![6, 18], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 18, 0, 0), + //ymd_hms(1997, 9, 9, 6, 0, 0), + //ymd_hms(1997, 9, 9, 18, 0, 0), + //], + //); + //} + + //#[test] + //fn weekly_by_minute() { + //let mut options = ParsedOptions { + //freq: Frequenzy::WEEKLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![1], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![6, 18], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 6, 0), + //ymd_hms(1997, 9, 2, 9, 18, 0), + //ymd_hms(1997, 9, 9, 9, 6, 0), + //], + //); + //} + + //#[test] + //fn weekly_by_second() { + //let mut options = ParsedOptions { + //freq: Frequenzy::WEEKLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![1], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![6, 18], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 0, 6), + //ymd_hms(1997, 9, 2, 9, 0, 18), + //ymd_hms(1997, 9, 9, 9, 0, 6), + //], + //); + //} + + //#[test] + //fn weekly_by_hour_and_minute() { + //let mut options = ParsedOptions { + //freq: Frequenzy::WEEKLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![1], + //byhour: vec![6, 18], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![6, 18], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 18, 6, 0), + //ymd_hms(1997, 9, 2, 18, 18, 0), + //ymd_hms(1997, 9, 9, 6, 6, 0), + //], + //); + //} + + //#[test] + //fn weekly_by_hour_and_second() { + //let mut options = ParsedOptions { + //freq: Frequenzy::WEEKLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![1], + //byhour: vec![6, 18], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![6, 18], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 18, 0, 6), + //ymd_hms(1997, 9, 2, 18, 0, 18), + //ymd_hms(1997, 9, 9, 6, 0, 6), + //], + //); + //} + + //#[test] + //fn weekly_by_minute_and_second() { + //let mut options = ParsedOptions { + //freq: Frequenzy::WEEKLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![1], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![6, 18], + //bysecond: vec![6, 18], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 6, 6), + //ymd_hms(1997, 9, 2, 9, 6, 18), + //ymd_hms(1997, 9, 2, 9, 18, 6), + //], + //); + //} + + //#[test] + //fn weekly_by_hour_and_minute_and_second() { + //let mut options = ParsedOptions { + //freq: Frequenzy::WEEKLY, + //count: Some(5), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![1], + //byhour: vec![6, 18], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![6, 18], + //bysecond: vec![6, 18], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 18, 6, 6), + //ymd_hms(1997, 9, 2, 18, 6, 18), + //ymd_hms(1997, 9, 2, 18, 18, 6), + //ymd_hms(1997, 9, 2, 18, 18, 18), + //ymd_hms(1997, 9, 9, 6, 6, 6), + //], + //); + //} + + //#[test] + //fn weekly_by_setpos() { + //let mut options = ParsedOptions { + //freq: Frequenzy::WEEKLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![1, 3], + //byhour: vec![6, 18], + //bysetpos: vec![3, -3], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 18, 0, 0), + //ymd_hms(1997, 9, 4, 6, 0, 0), + //ymd_hms(1997, 9, 9, 18, 0, 0), + //], + //); + //} + + //#[test] + //fn daily() { + //let mut options = ParsedOptions { + //freq: Frequenzy::DAILY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 0, 0), + //ymd_hms(1997, 9, 3, 9, 0, 0), + //ymd_hms(1997, 9, 4, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn daily_interval() { + //let mut options = ParsedOptions { + //freq: Frequenzy::DAILY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 2, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 0, 0), + //ymd_hms(1997, 9, 4, 9, 0, 0), + //ymd_hms(1997, 9, 6, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn daily_interval_large() { + //let mut options = ParsedOptions { + //freq: Frequenzy::DAILY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 92, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 0, 0), + //ymd_hms(1997, 12, 3, 9, 0, 0), + //ymd_hms(1998, 3, 5, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn daily_by_month() { + //let mut options = ParsedOptions { + //freq: Frequenzy::DAILY, + //count: Some(3), + //bymonth: vec![1, 3], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 1, 1, 9, 0, 0), + //ymd_hms(1998, 1, 2, 9, 0, 0), + //ymd_hms(1998, 1, 3, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn daily_by_monthday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::DAILY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![1, 3], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 3, 9, 0, 0), + //ymd_hms(1997, 10, 1, 9, 0, 0), + //ymd_hms(1997, 10, 3, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn daily_by_month_and_monthday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::DAILY, + //count: Some(3), + //bymonth: vec![1, 3], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![5, 7], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 1, 5, 9, 0, 0), + //ymd_hms(1998, 1, 7, 9, 0, 0), + //ymd_hms(1998, 3, 5, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn daily_by_weekday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::DAILY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![1, 3], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 0, 0), + //ymd_hms(1997, 9, 4, 9, 0, 0), + //ymd_hms(1997, 9, 9, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn daily_by_month_and_weekday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::DAILY, + //count: Some(3), + //bymonth: vec![1, 3], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![1, 3], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 1, 1, 9, 0, 0), + //ymd_hms(1998, 1, 6, 9, 0, 0), + //ymd_hms(1998, 1, 8, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn daily_by_monthday_and_weekday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::DAILY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![1, 3], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![1, 3], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 1, 1, 9, 0, 0), + //ymd_hms(1998, 2, 3, 9, 0, 0), + //ymd_hms(1998, 3, 3, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn daily_by_month_and_monthday_and_weekday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::DAILY, + //count: Some(3), + //bymonth: vec![1, 3], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![1, 3], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![1, 3], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 1, 1, 9, 0, 0), + //ymd_hms(1998, 3, 3, 9, 0, 0), + //ymd_hms(2001, 3, 1, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn daily_by_yearday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::DAILY, + //count: Some(4), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![1, 100, 200, 365], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 12, 31, 9, 0, 0), + //ymd_hms(1998, 1, 1, 9, 0, 0), + //ymd_hms(1998, 4, 10, 9, 0, 0), + //ymd_hms(1998, 7, 19, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn daily_by_yeardayneg() { + //let mut options = ParsedOptions { + //freq: Frequenzy::DAILY, + //count: Some(4), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![-365, -266, -166, -1], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 12, 31, 9, 0, 0), + //ymd_hms(1998, 1, 1, 9, 0, 0), + //ymd_hms(1998, 4, 10, 9, 0, 0), + //ymd_hms(1998, 7, 19, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn daily_by_month_and_yearday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::DAILY, + //count: Some(4), + //bymonth: vec![1, 7], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![1, 100, 200, 365], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 1, 1, 9, 0, 0), + //ymd_hms(1998, 7, 19, 9, 0, 0), + //ymd_hms(1999, 1, 1, 9, 0, 0), + //ymd_hms(1999, 7, 19, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn daily_by_weekno() { + //let mut options = ParsedOptions { + //freq: Frequenzy::DAILY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![20], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 5, 11, 9, 0, 0), + //ymd_hms(1998, 5, 12, 9, 0, 0), + //ymd_hms(1998, 5, 13, 9, 0, 0), + //], + //); + //} + + //// That's a nice one. The first days of week number one + //// may be in the last year. + //#[test] + //fn daily_by_weekno_and_weekday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::DAILY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![0], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![1], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 12, 29, 9, 0, 0), + //ymd_hms(1999, 1, 4, 9, 0, 0), + //ymd_hms(2000, 1, 3, 9, 0, 0), + //], + //); + //} + + //// Another nice test. The last days of week number 52/53 + //// may be in the next year. + //#[test] + //fn daily_by_weekno_and_weekday_large() { + //let mut options = ParsedOptions { + //freq: Frequenzy::DAILY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![6], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![52], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 12, 28, 9, 0, 0), + //ymd_hms(1998, 12, 27, 9, 0, 0), + //ymd_hms(2000, 1, 2, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn daily_by_weekno_and_weekday_last() { + //let mut options = ParsedOptions { + //freq: Frequenzy::DAILY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![6], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![-1], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 12, 28, 9, 0, 0), + //ymd_hms(1999, 1, 3, 9, 0, 0), + //ymd_hms(2000, 1, 2, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn daily_by_weekno_and_weekday53() { + //let mut options = ParsedOptions { + //freq: Frequenzy::DAILY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![0], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![53], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 12, 28, 9, 0, 0), + //ymd_hms(2004, 12, 27, 9, 0, 0), + //ymd_hms(2009, 12, 28, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn daily_by_hour() { + //let mut options = ParsedOptions { + //freq: Frequenzy::DAILY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![6, 18], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 18, 0, 0), + //ymd_hms(1997, 9, 3, 6, 0, 0), + //ymd_hms(1997, 9, 3, 18, 0, 0), + //], + //); + //} + + //#[test] + //fn daily_by_minute() { + //let mut options = ParsedOptions { + //freq: Frequenzy::DAILY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![6, 18], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 6, 0), + //ymd_hms(1997, 9, 2, 9, 18, 0), + //ymd_hms(1997, 9, 3, 9, 6, 0), + //], + //); + //} + + //#[test] + //fn daily_by_second() { + //let mut options = ParsedOptions { + //freq: Frequenzy::DAILY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![6, 18], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 0, 6), + //ymd_hms(1997, 9, 2, 9, 0, 18), + //ymd_hms(1997, 9, 3, 9, 0, 6), + //], + //); + //} + + //#[test] + //fn daily_by_hour_and_minute() { + //let mut options = ParsedOptions { + //freq: Frequenzy::DAILY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![6, 18], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![6, 18], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 18, 6, 0), + //ymd_hms(1997, 9, 2, 18, 18, 0), + //ymd_hms(1997, 9, 3, 6, 6, 0), + //], + //); + //} + + //#[test] + //fn daily_by_hour_and_second() { + //let mut options = ParsedOptions { + //freq: Frequenzy::DAILY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![6, 18], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![6, 18], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 18, 0, 6), + //ymd_hms(1997, 9, 2, 18, 0, 18), + //ymd_hms(1997, 9, 3, 6, 0, 6), + //], + //); + //} + + //#[test] + //fn daily_by_minute_and_second() { + //let mut options = ParsedOptions { + //freq: Frequenzy::DAILY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![6, 18], + //bysecond: vec![6, 18], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 6, 6), + //ymd_hms(1997, 9, 2, 9, 6, 18), + //ymd_hms(1997, 9, 2, 9, 18, 6), + //], + //); + //} + + //#[test] + //fn daily_by_hour_and_minute_and_second() { + //let mut options = ParsedOptions { + //freq: Frequenzy::DAILY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![6, 18], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![6, 18], + //bysecond: vec![6, 18], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 18, 6, 6), + //ymd_hms(1997, 9, 2, 18, 6, 18), + //ymd_hms(1997, 9, 2, 18, 18, 6), + //], + //); + //} + + //#[test] + //fn daily_by_setpos() { + //let mut options = ParsedOptions { + //freq: Frequenzy::DAILY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![6, 18], + //bysetpos: vec![3, -3], + //byweekno: vec![], + //byminute: vec![15, 45], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 18, 15, 0), + //ymd_hms(1997, 9, 3, 6, 45, 0), + //ymd_hms(1997, 9, 3, 18, 15, 0), + //], + //); + //} + + //#[test] + //fn hourly() { + //let mut options = ParsedOptions { + //freq: Frequenzy::HOURLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 0, 0), + //ymd_hms(1997, 9, 2, 10, 0, 0), + //ymd_hms(1997, 9, 2, 11, 0, 0), + //], + //); + //} + + //#[test] + //fn hourly_interval() { + //let mut options = ParsedOptions { + //freq: Frequenzy::HOURLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 2, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 0, 0), + //ymd_hms(1997, 9, 2, 11, 0, 0), + //ymd_hms(1997, 9, 2, 13, 0, 0), + //], + //); + //} + + //#[test] + //fn hourly_interval_large() { + //let mut options = ParsedOptions { + //freq: Frequenzy::HOURLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 769, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 0, 0), + //ymd_hms(1997, 10, 4, 10, 0, 0), + //ymd_hms(1997, 11, 5, 11, 0, 0), + //], + //); + //} + + //#[test] + //fn hourly_by_month() { + //let mut options = ParsedOptions { + //freq: Frequenzy::HOURLY, + //count: Some(3), + //bymonth: vec![1, 3], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 1, 1, 0, 0, 0), + //ymd_hms(1998, 1, 1, 1, 0, 0), + //ymd_hms(1998, 1, 1, 2, 0, 0), + //], + //); + //} + + //#[test] + //fn hourly_by_monthday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::HOURLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![1, 3], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 3, 0, 0, 0), + //ymd_hms(1997, 9, 3, 1, 0, 0), + //ymd_hms(1997, 9, 3, 2, 0, 0), + //], + //); + //} + + //#[test] + //fn hourly_by_month_and_monthday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::HOURLY, + //count: Some(3), + //bymonth: vec![1, 3], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![5, 7], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 1, 5, 0, 0, 0), + //ymd_hms(1998, 1, 5, 1, 0, 0), + //ymd_hms(1998, 1, 5, 2, 0, 0), + //], + //); + //} + + //#[test] + //fn hourly_by_weekday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::HOURLY, + //count: Some(5), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![1, 3], + //byhour: vec![], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 5, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 0, 0), + //ymd_hms(1997, 9, 2, 14, 0, 0), + //ymd_hms(1997, 9, 2, 19, 0, 0), + //ymd_hms(1997, 9, 4, 1, 0, 0), + //ymd_hms(1997, 9, 4, 6, 0, 0), + //], + //); + //} + + //#[test] + //fn hourly_by_month_and_weekday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::HOURLY, + //count: Some(3), + //bymonth: vec![1, 3], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![1, 3], + //byhour: vec![], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 1, 1, 0, 0, 0), + //ymd_hms(1998, 1, 1, 1, 0, 0), + //ymd_hms(1998, 1, 1, 2, 0, 0), + //], + //); + //} + + //#[test] + //fn hourly_by_monthday_and_weekday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::HOURLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![1, 3], + //byhour: vec![], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![1, 3], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 1, 1, 0, 0, 0), + //ymd_hms(1998, 1, 1, 1, 0, 0), + //ymd_hms(1998, 1, 1, 2, 0, 0), + //], + //); + //} + + //#[test] + //fn hourly_by_month_and_monthday_and_weekday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::HOURLY, + //count: Some(3), + //bymonth: vec![1, 3], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![1, 3], + //byhour: vec![], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![1, 3], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 1, 1, 0, 0, 0), + //ymd_hms(1998, 1, 1, 1, 0, 0), + //ymd_hms(1998, 1, 1, 2, 0, 0), + //], + //); + //} + + //#[test] + //fn hourly_by_yearday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::HOURLY, + //count: Some(8), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![1, 100, 200, 365], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 12, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 12, 31, 9, 0, 0), + //ymd_hms(1997, 12, 31, 21, 0, 0), + //ymd_hms(1998, 1, 1, 9, 0, 0), + //ymd_hms(1998, 1, 1, 21, 0, 0), + //ymd_hms(1998, 4, 10, 9, 0, 0), + //ymd_hms(1998, 4, 10, 21, 0, 0), + //ymd_hms(1998, 7, 19, 9, 0, 0), + //ymd_hms(1998, 7, 19, 21, 0, 0), + //], + //); + //} + + //#[test] + //fn hourly_by_yeardayneg() { + //let mut options = ParsedOptions { + //freq: Frequenzy::HOURLY, + //count: Some(8), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![-365, -266, -166, -1], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 12, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 12, 31, 9, 0, 0), + //ymd_hms(1997, 12, 31, 21, 0, 0), + //ymd_hms(1998, 1, 1, 9, 0, 0), + //ymd_hms(1998, 1, 1, 21, 0, 0), + //ymd_hms(1998, 4, 10, 9, 0, 0), + //ymd_hms(1998, 4, 10, 21, 0, 0), + //ymd_hms(1998, 7, 19, 9, 0, 0), + //ymd_hms(1998, 7, 19, 21, 0, 0), + //], + //); + //} + + //#[test] + //fn hourly_by_month_and_yearday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::HOURLY, + //count: Some(4), + //bymonth: vec![4, 7], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![1, 100, 200, 365], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 4, 10, 0, 0, 0), + //ymd_hms(1998, 4, 10, 1, 0, 0), + //ymd_hms(1998, 4, 10, 2, 0, 0), + //ymd_hms(1998, 4, 10, 3, 0, 0), + //], + //); + //} + + //#[test] + //fn hourly_by_weekno() { + //let mut options = ParsedOptions { + //freq: Frequenzy::HOURLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![], + //bysetpos: vec![], + //byweekno: vec![20], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 5, 11, 0, 0, 0), + //ymd_hms(1998, 5, 11, 1, 0, 0), + //ymd_hms(1998, 5, 11, 2, 0, 0), + //], + //); + //} + + //#[test] + //fn hourly_by_weekno_and_weekday() { + //let mut options = ParsedOptions { + //freq: Frequenzy::HOURLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![0], + //byhour: vec![], + //bysetpos: vec![], + //byweekno: vec![1], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 12, 29, 0, 0, 0), + //ymd_hms(1997, 12, 29, 1, 0, 0), + //ymd_hms(1997, 12, 29, 2, 0, 0), + //], + //); + //} + + //#[test] + //fn hourly_by_weekno_and_weekday_large() { + //let mut options = ParsedOptions { + //freq: Frequenzy::HOURLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![6], + //byhour: vec![], + //bysetpos: vec![], + //byweekno: vec![52], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 12, 28, 0, 0, 0), + //ymd_hms(1997, 12, 28, 1, 0, 0), + //ymd_hms(1997, 12, 28, 2, 0, 0), + //], + //); + //} + + //#[test] + //fn hourly_by_weekno_and_weekday_last() { + //let mut options = ParsedOptions { + //freq: Frequenzy::HOURLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![6], + //byhour: vec![], + //bysetpos: vec![], + //byweekno: vec![-1], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 12, 28, 0, 0, 0), + //ymd_hms(1997, 12, 28, 1, 0, 0), + //ymd_hms(1997, 12, 28, 2, 0, 0), + //], + //); + //} + + //#[test] + //fn hourly_by_weekno_and_weekday53() { + //let mut options = ParsedOptions { + //freq: Frequenzy::HOURLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![0], + //byhour: vec![], + //bysetpos: vec![], + //byweekno: vec![53], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1998, 12, 28, 0, 0, 0), + //ymd_hms(1998, 12, 28, 1, 0, 0), + //ymd_hms(1998, 12, 28, 2, 0, 0), + //], + //); + //} + + //#[test] + //fn hourly_by_hour() { + //let mut options = ParsedOptions { + //freq: Frequenzy::HOURLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![6, 18], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 18, 0, 0), + //ymd_hms(1997, 9, 3, 6, 0, 0), + //ymd_hms(1997, 9, 3, 18, 0, 0), + //], + //); + //} + + //#[test] + //fn hourly_by_minute() { + //let mut options = ParsedOptions { + //freq: Frequenzy::HOURLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![6, 18], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 6, 0), + //ymd_hms(1997, 9, 2, 9, 18, 0), + //ymd_hms(1997, 9, 2, 10, 6, 0), + //], + //); + //} + + //#[test] + //fn hourly_by_second() { + //let mut options = ParsedOptions { + //freq: Frequenzy::HOURLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![6, 18], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 0, 6), + //ymd_hms(1997, 9, 2, 9, 0, 18), + //ymd_hms(1997, 9, 2, 10, 0, 6), + //], + //); + //} + + //#[test] + //fn hourly_by_hour_and_minute() { + //let mut options = ParsedOptions { + //freq: Frequenzy::HOURLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![6, 18], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![6, 18], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 18, 6, 0), + //ymd_hms(1997, 9, 2, 18, 18, 0), + //ymd_hms(1997, 9, 3, 6, 6, 0), + //], + //); + //} + + //#[test] + //fn hourly_by_hour_and_second() { + //let mut options = ParsedOptions { + //freq: Frequenzy::HOURLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![6, 18], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![6, 18], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 18, 0, 6), + //ymd_hms(1997, 9, 2, 18, 0, 18), + //ymd_hms(1997, 9, 3, 6, 0, 6), + //], + //); + //} + + //#[test] + //fn hourly_by_minute_and_second() { + //let mut options = ParsedOptions { + //freq: Frequenzy::HOURLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![6, 18], + //bysecond: vec![6, 18], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 6, 6), + //ymd_hms(1997, 9, 2, 9, 6, 18), + //ymd_hms(1997, 9, 2, 9, 18, 6), + //], + //); + //} + + //#[test] + //fn hourly_by_hour_and_minute_and_second() { + //let mut options = ParsedOptions { + //freq: Frequenzy::HOURLY, + //count: Some(5), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![6, 18], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![6, 18], + //bysecond: vec![6, 18], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 18, 6, 6), + //ymd_hms(1997, 9, 2, 18, 6, 18), + //ymd_hms(1997, 9, 2, 18, 18, 6), + //ymd_hms(1997, 9, 2, 18, 18, 18), + //ymd_hms(1997, 9, 3, 6, 6, 6), + //], + //); + //} + + //#[test] + //fn hourly_by_setpos() { + //let mut options = ParsedOptions { + //freq: Frequenzy::HOURLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //byweekday: vec![], + //byhour: vec![], + //bysetpos: vec![3, -3], + //byweekno: vec![], + //byminute: vec![15, 45], + //bysecond: vec![15, 45], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //until: None, + //wkst: 0, + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 15, 45), + //ymd_hms(1997, 9, 2, 9, 45, 15), + //ymd_hms(1997, 9, 2, 10, 15, 45), + //], + //); + //} + + //#[test] + //fn until_not_matching() { + //let mut options = ParsedOptions { + //freq: Frequenzy::DAILY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //until: Some(ymd_hms(1997, 9, 5, 8, 0, 0)), + //wkst: 0, + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 0, 0), + //ymd_hms(1997, 9, 3, 9, 0, 0), + //ymd_hms(1997, 9, 4, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn until_matching() { + //let mut options = ParsedOptions { + //freq: Frequenzy::DAILY, + //count: Some(4), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //until: Some(ymd_hms(1997, 9, 4, 9, 0, 0)), + //wkst: 0, + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 0, 0), + //ymd_hms(1997, 9, 3, 9, 0, 0), + //ymd_hms(1997, 9, 4, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn until_single() { + //let mut options = ParsedOptions { + //freq: Frequenzy::DAILY, + //count: Some(1), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //until: Some(ymd_hms(1997, 9, 2, 9, 0, 0)), + //wkst: 0, + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //tzid: None, + //interval: 1, + //}; + //test_recurring(&mut options, &vec![ymd_hms(1997, 9, 2, 9, 0, 0)]); + //} + + //#[test] + //fn until_empty() { + //let mut options = ParsedOptions { + //freq: Frequenzy::DAILY, + //count: Some(1), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //until: Some(ymd_hms(1997, 9, 1, 9, 0, 0)), + //wkst: 0, + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //tzid: None, + //interval: 1, + //}; + //test_recurring(&mut options, &vec![]); + //} + + //#[test] + //fn until_with_date() { + //let mut options = ParsedOptions { + //freq: Frequenzy::DAILY, + //count: Some(4), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //until: Some(ymd_hms(1997, 9, 5, 0, 0, 0)), + //wkst: 0, + //byweekday: vec![], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //tzid: None, + //interval: 1, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 0, 0), + //ymd_hms(1997, 9, 3, 9, 0, 0), + //ymd_hms(1997, 9, 4, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn wkst_interval_mo() { + //let mut options = ParsedOptions { + //freq: Frequenzy::WEEKLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //until: None, + //wkst: 0, + //byweekday: vec![1, 6], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //tzid: None, + //interval: 2, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 0, 0), + //ymd_hms(1997, 9, 7, 9, 0, 0), + //ymd_hms(1997, 9, 16, 9, 0, 0), + //], + //); + //} + + //#[test] + //fn wkst_interval_su() { + //let mut options = ParsedOptions { + //freq: Frequenzy::WEEKLY, + //count: Some(3), + //bymonth: vec![], + //dtstart: ymd_hms(1997, 9, 2, 9, 0, 0), + //until: None, + //wkst: 6, + //byweekday: vec![1, 6], + //byhour: vec![9], + //bysetpos: vec![], + //byweekno: vec![], + //byminute: vec![0], + //bysecond: vec![0], + //byyearday: vec![], + //bymonthday: vec![], + //bynweekday: vec![], + //bynmonthday: vec![], + //tzid: None, + //interval: 2, + //}; + //test_recurring( + //&mut options, + //&vec![ + //ymd_hms(1997, 9, 2, 9, 0, 0), + //ymd_hms(1997, 9, 14, 9, 0, 0), + //ymd_hms(1997, 9, 16, 9, 0, 0), + //], + //); + //} } |