pub struct DateTime {
pub date: Date,
pub time: Time,
pub shift_minutes: isize,
}Fields§
§date: Date§time: Time§shift_minutes: isizeImplementations§
Source§impl DateTime
impl DateTime
pub fn new(date: Date, time: Time, shift_minutes: isize) -> Self
pub fn to_iso_8061(&self) -> String
pub fn shift_string(&self) -> String
pub fn from_seconds_since_unix_epoch(seconds: u64) -> Self
pub fn to_seconds_from_unix_epoch(&self) -> u64
pub fn to_seconds_from_unix_epoch_gmt(&self) -> u64
pub fn now() -> Self
pub fn now_seconds() -> u64
pub fn now_milliseconds() -> u128
pub fn set_shift(&mut self, minutes: isize)
pub fn add_seconds(&self, seconds: u64) -> Self
pub fn add_time(&self, time: Time) -> Self
pub fn sub_seconds(&mut self, seconds: u64) -> Self
pub fn normalize(&self) -> DateTime
Trait Implementations§
Source§impl Ord for DateTime
impl Ord for DateTime
Source§impl PartialOrd for DateTime
impl PartialOrd for DateTime
impl Copy for DateTime
impl Eq for DateTime
Auto Trait Implementations§
impl Freeze for DateTime
impl RefUnwindSafe for DateTime
impl Send for DateTime
impl Sync for DateTime
impl Unpin 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