aboutsummaryrefslogtreecommitdiff
path: root/src/commands/today/prelude.rs
blob: f02fffca2277842dfbaa4481b7b22d541520c1c2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
pub use std::iter::{
    empty,
    once,
};

pub use lazy_static::lazy_static;

pub use chrono::{
    Datelike,
    Duration,
};

pub use super::{
    TodayArgs,
    TodayIter,
};

#[inline]
pub fn month_day(date: chrono::NaiveDateTime) -> (u32, u32) {
    (date.month(), date.day())
}

pub const fn by_url(url: &'static str) -> TodayArgs {
    TodayArgs {
        url,

        start: None,
        end: None,
    }
}