pub struct DateTimeValue { /* private fields */ }Expand description
The call-site core: what tr! builds, and what formats it against a
catalog the caller supplies.
The call-site core: what tr! builds, and what formats it against a
catalog the caller supplies.
The call-site core: what tr! builds, and what formats it against a
catalog the caller supplies.
A date/time a call site owns: Arg::DateTime with its zone and
calendar owned.
Implementations§
Source§impl DateTimeValue
impl DateTimeValue
Sourcepub fn instant(epoch_ms: i64) -> Option<DateTimeValue>
pub fn instant(epoch_ms: i64) -> Option<DateTimeValue>
The instant epoch_ms milliseconds after 1970-01-01T00:00:00Z;
None past the year limit of Date.
Sourcepub fn floating(date: Date, time: Time) -> DateTimeValue
pub fn floating(date: Date, time: Time) -> DateTimeValue
A floating date and time: no offset, so the formatting time zone applies without conversion.
Sourcepub fn wall_time(date: Date, time: Time, zone: impl Into<Text>) -> DateTimeValue
pub fn wall_time(date: Date, time: Time, zone: impl Into<Text>) -> DateTimeValue
The wall time date time in the IANA zone zone — 09:00 in
Paris, whatever instant that is. A date/time function finds its
offset through the host’s zone data, and converts it from there to
the zone it shows.
Sourcepub fn with_zone(self, zone: impl Into<Text>) -> DateTimeValue
pub fn with_zone(self, zone: impl Into<Text>) -> DateTimeValue
The same instant, in the IANA zone zone: timeZone=input shows it
at that zone’s wall time, which a date/time function works out
through the host’s zone data. A floating value has no instant to
convert: its wall time is placed in zone, as
DateTimeValue::wall_time does.
Sourcepub fn with_calendar(self, calendar: impl Into<Text>) -> DateTimeValue
pub fn with_calendar(self, calendar: impl Into<Text>) -> DateTimeValue
The same value with a calendar override (a Unicode calendar
identifier), which travels with it into the date/time functions.
Trait Implementations§
Source§impl Clone for DateTimeValue
impl Clone for DateTimeValue
Source§impl Debug for DateTimeValue
DateTimeValue(2026-01-01T00:00:00.000), then the offset in seconds,
the zone and the calendar when there are any.
impl Debug for DateTimeValue
DateTimeValue(2026-01-01T00:00:00.000), then the offset in seconds,
the zone and the calendar when there are any.
Source§impl From<DateTime<'_>> for DateTimeValue
impl From<DateTime<'_>> for DateTimeValue
Source§fn from(d: DateTime<'_>) -> DateTimeValue
fn from(d: DateTime<'_>) -> DateTimeValue
Source§impl From<DateTimeValue> for ArgValue
impl From<DateTimeValue> for ArgValue
Source§fn from(d: DateTimeValue) -> ArgValue
fn from(d: DateTimeValue) -> ArgValue
Auto Trait Implementations§
impl Freeze for DateTimeValue
impl RefUnwindSafe for DateTimeValue
impl Send for DateTimeValue
impl Sync for DateTimeValue
impl Unpin for DateTimeValue
impl UnsafeUnpin for DateTimeValue
impl UnwindSafe for DateTimeValue
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more