pub struct Civil {
pub year: u16,
pub month: u8,
pub day: u8,
pub hour: u8,
pub minute: u8,
pub second: u8,
pub weekday: u8,
}Expand description
A broken-down UTC time.
§Examples
let c = parse_net::HttpDate::from_unix(784_111_777)?.civil();
assert_eq!((c.year, c.month, c.day, c.hour, c.minute, c.second, c.weekday), (1994, 11, 6, 8, 49, 37, 7));Fields§
§year: u16The year, 1 to 9999.
month: u8The month, 1 to 12.
day: u8The day of the month, 1 to 31.
hour: u8The hour, 0 to 23.
minute: u8The minute, 0 to 59.
second: u8The second, 0 to 59.
weekday: u8The ISO 8601 weekday: 1 = Monday … 7 = Sunday.
Trait Implementations§
impl Copy for Civil
impl Eq for Civil
impl StructuralPartialEq for Civil
Auto Trait Implementations§
impl Freeze for Civil
impl RefUnwindSafe for Civil
impl Send for Civil
impl Sync for Civil
impl Unpin for Civil
impl UnsafeUnpin for Civil
impl UnwindSafe for Civil
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more