[−][src]Struct monotron_api::Timestamp
Describes an instant in time. The system only supports local time and has no concept of time zones.
Fields
year_from_1970: u8The Gregorian calendar year, minus 1970 (so 10 is 1980, and 30 is the year 2000)
month: u8The month of the year, where January is 1 and December is 12
day: u8The day of the month where 1 is the first of the month, through to 28, 29, 30 or 31 (as appropriate)
hour: u8The hour in the day, from 0 to 23
minute: u8The minutes past the hour, from 0 to 59
second: u8The seconds past the minute, from 0 to 59. Note that some filesystems only have 2-second precision on their timestamps.
Methods
impl Timestamp[src]
pub fn day_of_week(&self) -> DayOfWeek[src]
Returns the day of the week for the given timestamp.
pub fn month_str(&self) -> &'static str[src]
Returns the current month as a UK English string (e.g. "August").
Trait Implementations
impl PartialEq<Timestamp> for Timestamp[src]
impl Eq for Timestamp[src]
impl Debug for Timestamp[src]
impl Clone for Timestamp[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> From<T> for T[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,