pub struct MonthWeekDay { /* private fields */ }Expand description
Day represented by a month, a month week and a week day
Implementations§
Source§impl MonthWeekDay
impl MonthWeekDay
Sourcepub const fn new(
month: u8,
week: u8,
week_day: u8,
) -> Result<Self, TransitionRuleError>
pub const fn new( month: u8, week: u8, week_day: u8, ) -> Result<Self, TransitionRuleError>
Construct a transition rule day represented by a month, a month week and a week day
Examples found in repository?
examples/statics.rs (line 47)
15 const TIME_ZONE_REF: TimeZoneRef<'static> = unwrap!(TimeZoneRef::new(
16 &[
17 Transition::new(-2334101314, 1),
18 Transition::new(-1157283000, 2),
19 Transition::new(-1155436200, 1),
20 Transition::new(-880198200, 3),
21 Transition::new(-769395600, 4),
22 Transition::new(-765376200, 1),
23 Transition::new(-712150200, 5),
24 ],
25 const {
26 &[
27 unwrap!(LocalTimeType::new(-37886, false, Some(b"LMT"))),
28 unwrap!(LocalTimeType::new(-37800, false, Some(b"HST"))),
29 unwrap!(LocalTimeType::new(-34200, true, Some(b"HDT"))),
30 unwrap!(LocalTimeType::new(-34200, true, Some(b"HWT"))),
31 unwrap!(LocalTimeType::new(-34200, true, Some(b"HPT"))),
32 unwrap!(LocalTimeType::new(-36000, false, Some(b"HST"))),
33 ]
34 },
35 &[
36 LeapSecond::new(78796800, 1),
37 LeapSecond::new(94694401, 2),
38 LeapSecond::new(126230402, 3),
39 LeapSecond::new(157766403, 4),
40 LeapSecond::new(189302404, 5),
41 LeapSecond::new(220924805, 6),
42 ],
43 const {
44 &Some(TransitionRule::Alternate(unwrap!(AlternateTime::new(
45 unwrap!(LocalTimeType::new(-36000, false, Some(b"HST"))),
46 unwrap!(LocalTimeType::new(-34200, true, Some(b"HPT"))),
47 RuleDay::MonthWeekDay(unwrap!(MonthWeekDay::new(10, 5, 0))),
48 93600,
49 RuleDay::MonthWeekDay(unwrap!(MonthWeekDay::new(3, 4, 4))),
50 7200,
51 ))))
52 },
53 ));Trait Implementations§
Source§impl Clone for MonthWeekDay
impl Clone for MonthWeekDay
Source§fn clone(&self) -> MonthWeekDay
fn clone(&self) -> MonthWeekDay
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for MonthWeekDay
Source§impl Debug for MonthWeekDay
impl Debug for MonthWeekDay
impl Eq for MonthWeekDay
Source§impl PartialEq for MonthWeekDay
impl PartialEq for MonthWeekDay
Source§fn eq(&self, other: &MonthWeekDay) -> bool
fn eq(&self, other: &MonthWeekDay) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for MonthWeekDay
Auto Trait Implementations§
impl Freeze for MonthWeekDay
impl RefUnwindSafe for MonthWeekDay
impl Send for MonthWeekDay
impl Sync for MonthWeekDay
impl Unpin for MonthWeekDay
impl UnsafeUnpin for MonthWeekDay
impl UnwindSafe for MonthWeekDay
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