diff options
author | Fredrik Meringdal <fmeringdal@hotmail.com> | 2020-10-17 17:48:22 +0200 |
---|---|---|
committer | Fredrik Meringdal <fmeringdal@hotmail.com> | 2020-10-17 17:48:22 +0200 |
commit | 0ed916e47dfffe56f37ce52488160a5cc6718255 (patch) | |
tree | 078ea9393a535d7cc8f1c6699df9b57631e286d7 /src/iter.rs | |
parent | a02757e202926847ab04b7f7ec2861d3c19608e7 (diff) | |
download | rust_rrule-0ed916e47dfffe56f37ce52488160a5cc6718255.zip |
support for negative yearday
Diffstat (limited to 'src/iter.rs')
-rw-r--r-- | src/iter.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/iter.rs b/src/iter.rs index dd1066a..e556318 100644 --- a/src/iter.rs +++ b/src/iter.rs @@ -310,7 +310,7 @@ pub fn is_filtered(ii: &IterInfo, current_day: usize, options: &ParsedOptions) - && !includes(&options.bynmonthday, &ii.nmdaymask().unwrap()[current_day])) || (not_empty(&options.byyearday) && ((current_day < ii.yearlen().unwrap() - && !includes(&options.byyearday, &(current_day + 1)) + && !includes(&options.byyearday, &(current_day as isize + 1)) && !includes( &options.byyearday.iter().map(|v| *v as isize).collect(), &(-(ii.yearlen().unwrap() as isize) + current_day as isize), @@ -318,7 +318,7 @@ pub fn is_filtered(ii: &IterInfo, current_day: usize, options: &ParsedOptions) - || (current_day >= ii.yearlen().unwrap() && !includes( &options.byyearday, - &(current_day + 1 - ii.yearlen().unwrap()), + &((current_day + 1 - ii.yearlen().unwrap()) as isize), ) && !includes( &options.byyearday.iter().map(|v| *v as isize).collect(), |