From 61aac0d2773f7a073b63661ec150954414f5696e Mon Sep 17 00:00:00 2001 From: Fredrik Meringdal Date: Wed, 3 Feb 2021 17:55:43 +0100 Subject: iterator for rrule --- src/iter/iter_v2.rs | 151 ++++++++++++++++++++++++++++++ src/iter/iterinfo.rs | 12 +-- src/iter/mod.rs | 258 +++++++++++++++++++++++++-------------------------- src/rrule.rs | 59 +++--------- src/rrule_iter.rs | 64 ++++++++----- 5 files changed, 337 insertions(+), 207 deletions(-) create mode 100644 src/iter/iter_v2.rs (limited to 'src') diff --git a/src/iter/iter_v2.rs b/src/iter/iter_v2.rs new file mode 100644 index 0000000..609206d --- /dev/null +++ b/src/iter/iter_v2.rs @@ -0,0 +1,151 @@ +use crate::{datetime::Time, Frequenzy}; +use chrono::prelude::*; +use chrono_tz::Tz; + +use super::{build_poslist, from_ordinal, increment_counter_date, remove_filtered_days, IterInfo}; + +pub struct RRuleIter { + pub counter_date: DateTime, + pub ii: IterInfo, + pub timeset: Vec