aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 39f225f..0f2c597 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -251,8 +251,8 @@ impl SimUpdates {
update,
} in periodic.iter()
{
- let base = from.unwrap_or(0);
- if month % period == base && base <= month && to.unwrap_or(month + 1) > month {
+ let base = from.unwrap_or(1);
+ if (month - base) % period == 0 && base <= month && to.unwrap_or(month) >= month {
ret.push(*update);
}
}