Struct mini_functions::date::Date
source · #[non_exhaustive]pub struct Date {}Expand description
Date Utility
By default, the current date and time in UTC is returned.
Implementations§
source§impl Date
impl Date
sourcepub fn day() -> String
pub fn day() -> String
Get the day of the date in the stored offset.
The day is a number from 1 to 31.
sourcepub fn hour() -> String
pub fn hour() -> String
Get the clock hour in the stored offset.
The hour is a number from 0 to 23. 0 is midnight. 12 is noon.
sourcepub fn iso_week() -> String
pub fn iso_week() -> String
Get the ISO week number of the date in the stored offset.
The returned value will always be in the range 1..=53.
sourcepub fn microsecond() -> String
pub fn microsecond() -> String
Get the microsecond of the second in the stored offset.
The returned value will always be in the range 0..1_000_000.
sourcepub fn millisecond() -> String
pub fn millisecond() -> String
Get the milliseconds within the second in the stored offset.
The returned value will always be in the range 0..1_000.
sourcepub fn minute() -> String
pub fn minute() -> String
Get the minute within the hour in the stored offset.
The returned value will always be in the range 0..60.
sourcepub fn month() -> String
pub fn month() -> String
Get the month of the date in the stored offset.
The month is a number from 1 to 12. January is 1, February is 2, and so on.
sourcepub fn nanosecond() -> String
pub fn nanosecond() -> String
Get the nanoseconds within the second in the stored offset.
The returned value will always be in the range 0..1_000_000_000.
sourcepub fn ordinal() -> String
pub fn ordinal() -> String
Get the day of the year of the date in the stored offset.
The returned value will always be in the range 1..=366.
sourcepub fn second() -> String
pub fn second() -> String
Get the second within the minute in the stored offset.
The returned value will always be in the range 0..60.
Trait Implementations§
source§impl PartialEq<Date> for Date
impl PartialEq<Date> for Date
source§impl PartialOrd<Date> for Date
impl PartialOrd<Date> for Date
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read more