Struct font_types::LongDateTime
source · pub struct LongDateTime(_);
Expand description
A simple datetime type.
This represented as a number of seconds since 12:00 midnight, January 1, 1904, UTC.
Implementations§
source§impl LongDateTime
impl LongDateTime
sourcepub const fn new(secs: i64) -> Self
pub const fn new(secs: i64) -> Self
Create with a number of seconds relative to 1904-01-01 00:00.
sourcepub const fn as_secs(&self) -> i64
pub const fn as_secs(&self) -> i64
The number of seconds since 00:00 1904-01-01, UTC.
This can be a negative number, which presumably represents a date prior to the reference date.
sourcepub const fn to_be_bytes(self) -> [u8; 8]
pub const fn to_be_bytes(self) -> [u8; 8]
The representation of this datetime as a big-endian byte array.
Trait Implementations§
source§impl Clone for LongDateTime
impl Clone for LongDateTime
source§fn clone(&self) -> LongDateTime
fn clone(&self) -> LongDateTime
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for LongDateTime
impl Debug for LongDateTime
source§impl Default for LongDateTime
impl Default for LongDateTime
source§fn default() -> LongDateTime
fn default() -> LongDateTime
Returns the “default value” for a type. Read more
source§impl Hash for LongDateTime
impl Hash for LongDateTime
source§impl Ord for LongDateTime
impl Ord for LongDateTime
source§fn cmp(&self, other: &LongDateTime) -> Ordering
fn cmp(&self, other: &LongDateTime) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<LongDateTime> for LongDateTime
impl PartialEq<LongDateTime> for LongDateTime
source§fn eq(&self, other: &LongDateTime) -> bool
fn eq(&self, other: &LongDateTime) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<LongDateTime> for LongDateTime
impl PartialOrd<LongDateTime> for LongDateTime
source§fn partial_cmp(&self, other: &LongDateTime) -> Option<Ordering>
fn partial_cmp(&self, other: &LongDateTime) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more