Improve a bit the algorithm that choice the word of the day
parent
198780ab93
commit
275bc79f21
|
@ -14,7 +14,7 @@ pub fn get_word_of_the_day() -> String {
|
||||||
let year = date.year() as usize;
|
let year = date.year() as usize;
|
||||||
let month = date.month() as usize;
|
let month = date.month() as usize;
|
||||||
let day = date.day() as usize;
|
let day = date.day() as usize;
|
||||||
let index = year + month * day;
|
let index = year * month * day;
|
||||||
|
|
||||||
WORDS[index % WORDS.len()].clone()
|
WORDS[index % WORDS.len()].clone()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue