aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorGuillermo Ramos2025-03-16 20:13:49 +0100
committerGuillermo Ramos2025-03-23 15:02:36 +0100
commit0e1b22d5583064a1f62ea5c0cb90b0a1c8ffce74 (patch)
tree7de97c8889d51159e44d9b4384775c4096aa2a13 /src/lib.rs
parent274e67b2021d23e036a76b9ae947e8dace0c2de1 (diff)
downloadhiccup-0e1b22d5583064a1f62ea5c0cb90b0a1c8ffce74.tar.gz
Periodic updates UI
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);
}
}