pub struct LogosDate(pub i32);Expand description
Date stored as days since Unix epoch (1970-01-01).
Range: ±5.8 million years from epoch.
Tuple Fields§
§0: i32Implementations§
Source§impl LogosDate
impl LogosDate
Sourcepub fn from_ymd(year: i64, month: i64, day: i64) -> LogosDate
pub fn from_ymd(year: i64, month: i64, day: i64) -> LogosDate
Construct a date from civil (year, month, day) via base days_from_civil — the AOT mirror
of the makeDate builtin.
Sourcepub fn year(&self) -> i64
pub fn year(&self) -> i64
UTC calendar components — AOT mirrors of year_of/month_of/day_of/weekday_of on a Date.
pub fn month(&self) -> i64
pub fn day(&self) -> i64
pub fn weekday(&self) -> i64
Sourcepub fn iso_week(&self) -> i64
pub fn iso_week(&self) -> i64
The ISO-8601 week number (1..=53) — the AOT mirror of week_of on a Date.
Trait Implementations§
Source§impl Ord for LogosDate
impl Ord for LogosDate
Source§impl OtherValue for LogosDate
impl OtherValue for LogosDate
Source§fn display_string(&self) -> String
fn display_string(&self) -> String
How the value prints.
Source§fn equals(&self, o: &(dyn OtherValue + 'static)) -> bool
fn equals(&self, o: &(dyn OtherValue + 'static)) -> bool
The language’s equality with another value of a kind outside the tower.
Source§fn order(&self, o: &LogosValue) -> Option<Option<Ordering>>
fn order(&self, o: &LogosValue) -> Option<Option<Ordering>>
The order of
self against o, None when the language orders no such pair.Source§fn combine(
&self,
op: Op,
o: &LogosValue,
reversed: bool,
) -> Option<Result<LogosValue, String>>
fn combine( &self, op: Op, o: &LogosValue, reversed: bool, ) -> Option<Result<LogosValue, String>>
self op o, or o op self when reversed; None when the language has no arm for the pair.Source§impl PartialOrd for LogosDate
impl PartialOrd for LogosDate
impl Copy for LogosDate
impl Eq for LogosDate
impl StructuralPartialEq for LogosDate
Auto Trait Implementations§
impl Freeze for LogosDate
impl RefUnwindSafe for LogosDate
impl Send for LogosDate
impl Sync for LogosDate
impl Unpin for LogosDate
impl UnsafeUnpin for LogosDate
impl UnwindSafe for LogosDate
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,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.