From 0dc547e5ac5736174bb9727e1e93da987ed781fd Mon Sep 17 00:00:00 2001 From: Nathan Perry Date: Sat, 26 Sep 2020 15:05:10 -0400 Subject: soviet today --- src/commands/today/mod.rs | 2 ++ src/commands/today/ussr.rs | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 src/commands/today/ussr.rs diff --git a/src/commands/today/mod.rs b/src/commands/today/mod.rs index bf9a439..84f3f1b 100644 --- a/src/commands/today/mod.rs +++ b/src/commands/today/mod.rs @@ -32,6 +32,7 @@ mod sept_21; mod nov_5; mod halloween; +mod ussr; mod wednesday; @@ -66,6 +67,7 @@ lazy_static! { nov_5::nov_5, halloween::halloween, + ussr::ussr, wednesday::wednesday, diff --git a/src/commands/today/ussr.rs b/src/commands/today/ussr.rs new file mode 100644 index 0000000..7085d82 --- /dev/null +++ b/src/commands/today/ussr.rs @@ -0,0 +1,25 @@ +use super::prelude::*; + +pub fn ussr(date: chrono::NaiveDate) -> TodayIter { + let ok = match month_day(date) { + // red army day + (2, 23) => true, + + // cosmonautics day + (4, 12) => true, + + // constitution day + (10, 7) => true, + + // november revolution day + (11, 7) => true, + + _ => false, + }; + + if !ok { + return Box::new(empty()); + } + + Box::new(once(by_url("https://www.youtube.com/watch?v=U06jlgpMtQs"))) +} -- cgit v1.3.1