aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Perry <np@nathanperry.dev>2020-09-26 15:05:10 -0400
committerNathan Perry <np@nathanperry.dev>2020-09-26 15:05:10 -0400
commit0dc547e5ac5736174bb9727e1e93da987ed781fd (patch)
tree9788a735df5fffc538ffc74c44440bfd62bb2b05
parentee1162278e54b0ecfc3de6d544bc206b9698e06d (diff)
soviet today
-rw-r--r--src/commands/today/mod.rs2
-rw-r--r--src/commands/today/ussr.rs25
2 files changed, 27 insertions, 0 deletions
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")))
+}