pub struct DateTime {
pub date: Date,
pub time: Time,
pub has_seconds: bool,
pub invalid: bool,
pub summer_time: bool,
pub leap_year: bool,
pub weekday: u8,
pub week: u8,
}Expand description
A date and time, data type F (minutes) or I (seconds). The meter’s local time.
Fields§
§date: DateThe date.
time: TimeThe time of day.
has_seconds: boolType I: the time has seconds. Type F: time.second is 0 and not meaningful.
invalid: boolThe meter flags the time as invalid (IV bit).
summer_time: boolThe meter flags summer (daylight saving) time: SU bit (type F), DST bit (type I).
leap_year: boolType I: the meter flags the year as a leap year.
weekday: u8Type I: day of week, 1 = Monday … 7 = Sunday, 0 = not given.
week: u8Type I: week of the year, 1–53, 0 = not given.
Implementations§
Source§impl DateTime
impl DateTime
Sourcepub fn new(year: u16, month: u8, day: u8, hour: u8, minute: u8) -> Option<Self>
pub fn new(year: u16, month: u8, day: u8, hour: u8, minute: u8) -> Option<Self>
A valid local date and time (to set a meter’s clock with
master::set_time). None if it cannot exist or lies
outside 1981–2299, the years type F can carry.
Trait Implementations§
impl Copy for DateTime
impl Eq for DateTime
impl StructuralPartialEq for DateTime
Auto Trait Implementations§
impl Forget for DateTime
impl Freeze for DateTime
impl Move for DateTime
impl RefUnwindSafe for DateTime
impl Send for DateTime
impl Sync for DateTime
impl Unpin for DateTime
impl UnsafeUnpin for DateTime
impl UnwindSafe for DateTime
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