diff options
| author | Nathan Perry <np@nathanperry.dev> | 2020-09-25 21:37:16 -0400 |
|---|---|---|
| committer | Nathan Perry <np@nathanperry.dev> | 2020-09-25 21:37:16 -0400 |
| commit | 87d92a93d8493e0264c381aa005bf9feaef976ed (patch) | |
| tree | e719b45bbf1ca800bf05c2aa43dbfe7d8317b0dd /src/commands/today/prelude.rs | |
| parent | 0e3ea2f3f4cef9398141e894df6838ac5c07eb42 (diff) | |
reorganize 'today'
Diffstat (limited to 'src/commands/today/prelude.rs')
| -rw-r--r-- | src/commands/today/prelude.rs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/commands/today/prelude.rs b/src/commands/today/prelude.rs new file mode 100644 index 0000000..d0570fd --- /dev/null +++ b/src/commands/today/prelude.rs @@ -0,0 +1,31 @@ +pub use std::iter::{ + once, + empty, +}; + +pub use lazy_static::lazy_static; + +pub use chrono::{ + Datelike, + Duration, +}; + +pub use super::{ + TodayArgs, + TodayIter, +}; + + +#[inline] +pub fn month_day(date: chrono::NaiveDate) -> (u32, u32) { + (date.month(), date.day()) +} + +pub const fn by_url(url: &'static str) -> TodayArgs { + TodayArgs { + url, + + start: None, + end: None, + } +} |
