ako 0.0.3

Ako is a Rust crate that offers a practical and human-friendly approach to creating, manipulating, formatting and converting dates, times and timestamps.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::Moment;

/// Types that can be viewed as a moment on the time-line.
pub trait AsMoment {
    fn as_moment(&self) -> Moment;
}

#[cfg(feature = "std")]
impl AsMoment for std::time::SystemTime {
    #[inline]
    fn as_moment(&self) -> Moment {
        Moment::from(*self)
    }
}