Now

Trait Now 

Source
pub trait Now {
    // Required method
    fn now(&self) -> Date<Local>;
}
Expand description

Trait providing a now function.

The use of a trait instead of calling directly Local::now is needed in order to be able to mock time in tests

Required Methods§

Source

fn now(&self) -> Date<Local>

Returns current local time

Implementors§