aboutsummaryrefslogtreecommitdiff
path: root/src/commands/today/prelude.rs
blob: d0570fd4e450f421c67828d36e2217c84383921c (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
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,
    }
}