From 198780ab9319c534082870f85605f1f6b17b84cf Mon Sep 17 00:00:00 2001 From: kirbylife Date: Sun, 8 Oct 2023 22:29:16 -0600 Subject: [PATCH] Improve a bit the word selection algorithm --- src/services/words.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/words.rs b/src/services/words.rs index e11c986..df3395f 100644 --- a/src/services/words.rs +++ b/src/services/words.rs @@ -14,7 +14,7 @@ pub fn get_word_of_the_day() -> String { let year = date.year() as usize; let month = date.month() as usize; let day = date.day() as usize; - let index = year + month + day; + let index = year + month * day; WORDS[index % WORDS.len()].clone() }