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§
Source§impl<'a> TimeZone<'a>
impl<'a> TimeZone<'a>
Sourcepub fn standard<S>(tzid: S, definition: Standard<'a>) -> Self
pub fn standard<S>(tzid: S, definition: Standard<'a>) -> Self
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>) -> Self
pub fn daylight<S>(tzid: S, definition: Daylight<'a>) -> Self
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)
pub fn push<P>(&mut self, property: P)
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.