Skip to main content

ReferenceWithTimezone

Struct ReferenceWithTimezone 

Source
pub struct ReferenceWithTimezone {
    pub instant: JsDate,
    pub timezone_offset: Option<i64>,
}
Expand description

upstream ReferenceWithTimezone.

Fields§

§instant: JsDate§timezone_offset: Option<i64>

Minutes east of UTC, or None (use the system time zone, which is UTC).

Implementations§

Source§

impl ReferenceWithTimezone

Source

pub fn new( instant: JsDate, timezone_offset: Option<i64>, ) -> ReferenceWithTimezone

Source

pub fn from_input( input: &ReferenceInput, overrides: &TimezoneAbbrMap, now: JsDate, ) -> ReferenceWithTimezone

ReferenceWithTimezone.fromInput(input, timezoneOverrides). now is used where upstream calls new Date().

Source

pub fn get_date_with_adjusted_timezone(&self) -> JsDate

getDateWithAdjustedTimezone(): a date whose (system-local = UTC) fields equal the reference’s wall-clock fields in the reference time zone.

Source

pub fn get_system_timezone_adjustment_minute( &self, date: Option<JsDate>, override_offset: Option<i64>, ) -> i64

getSystemTimezoneAdjustmentMinute(date, overrideTimezoneOffset).

Source

pub fn get_timezone_offset(&self) -> i64

getTimezoneOffset().

Trait Implementations§

Source§

impl Clone for ReferenceWithTimezone

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ReferenceWithTimezone

Source§

impl Debug for ReferenceWithTimezone

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for ReferenceWithTimezone

Source§

impl PartialEq for ReferenceWithTimezone

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ReferenceWithTimezone

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.