From 0e1b22d5583064a1f62ea5c0cb90b0a1c8ffce74 Mon Sep 17 00:00:00 2001 From: Guillermo Ramos Date: Sun, 16 Mar 2025 20:13:49 +0100 Subject: Periodic updates UI --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib.rs') 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); } } -- cgit v1.2.3