pub struct DateTime { /* private fields */ }
Expand description
A Haystack DateTime.
Implementations§
Source§impl DateTime
impl DateTime
pub fn new(date_time: DateTime<Tz>) -> Self
pub fn date_time(&self) -> &DateTime<Tz>
pub fn into_date_time(self) -> DateTime<Tz>
Sourcepub fn time_zone(&self) -> &str
pub fn time_zone(&self) -> &str
Return the IANA TZDB identifier, for example “America/New_York”.
Sourcepub fn short_time_zone(&self) -> &str
pub fn short_time_zone(&self) -> &str
Return the short name of the time zone. These names should match with the shortened time zone names used in SkySpark.
Trait Implementations§
Source§impl Hayson for DateTime
impl Hayson for DateTime
fn from_hayson(value: &Value) -> Result<Self, FromHaysonError>
fn to_hayson(&self) -> Value
impl Eq for DateTime
impl StructuralPartialEq 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.