pub struct TimeZone<'a> { /* private fields */ }
Expand description
The VTIMEZONE
calendar component
A TimeZone
component is unambiguously defined by the set of time
measurement rules (Standard
or Daylight
) determined by the governing
body for a given geographic area. (see RFC5545 3.6.5. Time Zone Component Component)
Implementations
sourceimpl<'a> TimeZone<'a>
impl<'a> TimeZone<'a>
sourcepub fn standard<S>(tzid: S, definition: Standard<'a>) -> Selfwhere
S: Into<Cow<'a, str>>,
pub fn standard<S>(tzid: S, definition: Standard<'a>) -> Selfwhere
S: Into<Cow<'a, str>>,
Creates a new VTIMEZONE
calendar component from TZID
property and
STANDARD
sub-component. More definitions can be added with
TimeZone::add_standard()
or TimeZone::add_daylight()
.
sourcepub fn daylight<S>(tzid: S, definition: Daylight<'a>) -> Selfwhere
S: Into<Cow<'a, str>>,
pub fn daylight<S>(tzid: S, definition: Daylight<'a>) -> Selfwhere
S: Into<Cow<'a, str>>,
Creates a new VTIMEZONE
calendar component from TZID
property and
DAYLIGHT
sub-component. More definitions can be added with
TimeZone::add_standard()
or TimeZone::add_daylight()
.
sourcepub fn push<P>(&mut self, property: P)where
P: Into<Property<'a>>,
pub fn push<P>(&mut self, property: P)where
P: Into<Property<'a>>,
Adds a property to the time zone. The RFC5545 specifies which properties can be added to a time zone.
sourcepub fn add_standard(&mut self, definition: Standard<'a>)
pub fn add_standard(&mut self, definition: Standard<'a>)
Adds an additional STANDARD
definition to the time zone. For more
time zone definitions, the IANA database could prove helpful.
sourcepub fn add_daylight(&mut self, definition: Daylight<'a>)
pub fn add_daylight(&mut self, definition: Daylight<'a>)
Adds an additional DAYLIGHT
definition to the time zone. For more
time zone definitions, the IANA database could prove helpful.
Trait Implementations
sourceimpl<'a> Ord for TimeZone<'a>
impl<'a> Ord for TimeZone<'a>
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
sourceimpl<'a> PartialEq<TimeZone<'a>> for TimeZone<'a>
impl<'a> PartialEq<TimeZone<'a>> for TimeZone<'a>
sourceimpl<'a> PartialOrd<TimeZone<'a>> for TimeZone<'a>
impl<'a> PartialOrd<TimeZone<'a>> for TimeZone<'a>
sourcefn partial_cmp(&self, other: &TimeZone<'a>) -> Option<Ordering>
fn partial_cmp(&self, other: &TimeZone<'a>) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more