Debian Codegraph @

src/shared/posix.rs

raw symbols SCIP
1 // auto-generated by: jiff-cli generate shared
2
3 use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Debug#;
4
5 use superrust-analyzer cargo jiff-static 0.2.16 shared/::{
6 utilrust-analyzer cargo jiff-static 0.2.16 shared/util/::{
7 array_strrust-analyzer cargo jiff-static 0.2.16 shared/util/array_str/::Abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/util/array_str/Abbreviation#,
8 errorrust-analyzer cargo jiff-static 0.2.16 shared/util/error/::{errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!, Errorrust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error#},
9 escaperust-analyzer cargo jiff-static 0.2.16 shared/util/escape/::{Byterust-analyzer cargo jiff-static 0.2.16 shared/util/escape/Byte#, Bytesrust-analyzer cargo jiff-static 0.2.16 shared/util/escape/Bytes#},
10 itimerust-analyzer cargo jiff-static 0.2.16 shared/util/itime/::{
11 IAmbiguousOffsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#, IDaterust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate#, IDateTimerust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDateTime#, IOffsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IOffset#, ITimerust-analyzer cargo jiff-static 0.2.16 shared/util/itime/ITime#, ITimeSecondrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/ITimeSecond#,
12 ITimestamprust-analyzer cargo jiff-static 0.2.16 shared/util/itime/ITimestamp#, IWeekdayrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IWeekday#,
13 },
14 },
15 PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#, PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#, PosixDstrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#, PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#, PosixRulerust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#, PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#,
16 PosixTimeZonerust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#,
17 };
18
19 impl PosixTimeZonerust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#<Abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/util/array_str/Abbreviation#> {
20 /// Parse a POSIX `TZ` environment variable, assuming it's a rule and not
21 /// an implementation defined value, from the given bytes.
22 pub fn parserust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<super::util::array_str::ArrayStr<ABBREVIATION_MAX>>`]parse().(bytes: &[u8]) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<PosixTimeZonerust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#<Abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/util/array_str/Abbreviation#>, Errorrust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error#> {
23 // We enable the IANA v3+ extensions here. (Namely, that the time
24 // specification hour value has the range `-167..=167` instead of
25 // `0..=24`.) Requiring strict POSIX rules doesn't seem necessary
26 // since the extension is a strict superset. Plus, GNU tooling
27 // seems to accept the extension.
28 let parser = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser# { ianav3plusrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#ianav3plus.: true, ..Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().(bytes) };
29 parser.parserust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse().()
30 }
31 }
32
33 impl<ABBREV: AsRefrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/AsRef#<str> + Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Debug#> PosixTimeZonerust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#<ABBREV> {
34 /// Returns the appropriate time zone offset to use for the given
35 /// timestamp.
36 ///
37 /// If you need information like whether the offset is in DST or not, or
38 /// the time zone abbreviation, then use `PosixTimeZone::to_offset_info`.
39 /// But that API may be more expensive to use, so only use it if you need
40 /// the additional data.
41 pub(craterust-analyzer cargo jiff-static 0.2.16 crate/) fn to_offsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]to_offset().(&self, timestamp: ITimestamprust-analyzer cargo jiff-static 0.2.16 shared/util/itime/ITimestamp#) -> IOffsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IOffset# {
42 let std_offset = self.std_offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#std_offset..to_ioffsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixOffset]to_ioffset().();
43 if self.dstrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#dst..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().() {
44 return std_offset;
45 }
46
47 let dt = timestamp.to_datetimerust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[ITimestamp]to_datetime().(IOffsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IOffset#::UTCrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IOffset]UTC.);
48 self.dst_info_utcrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]dst_info_utc().(dt.daterust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDateTime#date..yearrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate#year.)
49 .filterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]filter().(|dst_info| dst_info.in_dstrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`DstInfo<'a, ABBREV>`]in_dst().(dt))
50 .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]map().(|dst_info| dst_info.offsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`DstInfo<'a, ABBREV>`]offset().().to_ioffsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixOffset]to_ioffset().())
51 .unwrap_or_elserust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or_else().(|| std_offset)
52 }
53
54 /// Returns the appropriate time zone offset to use for the given
55 /// timestamp.
56 ///
57 /// This also includes whether the offset returned should be considered
58 /// to be "DST" or not, along with the time zone abbreviation (e.g., EST
59 /// for standard time in New York, and EDT for DST in New York).
60 pub(craterust-analyzer cargo jiff-static 0.2.16 crate/) fn to_offset_inforust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]to_offset_info().(
61 &self,
62 timestamp: ITimestamprust-analyzer cargo jiff-static 0.2.16 shared/util/itime/ITimestamp#,
63 ) -> (IOffsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IOffset#, &'_ str, bool) {
64 let std_offset = self.std_offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#std_offset..to_ioffsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixOffset]to_ioffset().();
65 if self.dstrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#dst..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().() {
66 return (std_offset, self.std_abbrevrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#std_abbrev..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/AsRef#as_ref().(), false);
67 }
68
69 let dt = timestamp.to_datetimerust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[ITimestamp]to_datetime().(IOffsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IOffset#::UTCrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IOffset]UTC.);
70 self.dst_info_utcrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]dst_info_utc().(dt.daterust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDateTime#date..yearrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate#year.)
71 .filterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]filter().(|dst_info| dst_info.in_dstrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`DstInfo<'a, ABBREV>`]in_dst().(dt))
72 .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]map().(|dst_info| {
73 (
74 dst_info.offsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`DstInfo<'a, ABBREV>`]offset().().to_ioffsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixOffset]to_ioffset().(),
75 dst_info.dstrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#dst..abbrevrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#abbrev..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/AsRef#as_ref().(),
76 true,
77 )
78 })
79 .unwrap_or_elserust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or_else().(|| (std_offset, self.std_abbrevrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#std_abbrev..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/AsRef#as_ref().(), false))
80 }
81
82 /// Returns a possibly ambiguous timestamp for the given civil datetime.
83 ///
84 /// The given datetime should correspond to the "wall" clock time of what
85 /// humans use to tell time for this time zone.
86 ///
87 /// Note that "ambiguous timestamp" is represented by the possible
88 /// selection of offsets that could be applied to the given datetime. In
89 /// general, it is only ambiguous around transitions to-and-from DST. The
90 /// ambiguity can arise as a "fold" (when a particular wall clock time is
91 /// repeated) or as a "gap" (when a particular wall clock time is skipped
92 /// entirely).
93 pub(craterust-analyzer cargo jiff-static 0.2.16 crate/) fn to_ambiguous_kindrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]to_ambiguous_kind().(&self, dt: IDateTimerust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDateTime#) -> IAmbiguousOffsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset# {
94 let year = dt.daterust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDateTime#date..yearrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate#year.;
95 let std_offset = self.std_offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#std_offset..to_ioffsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixOffset]to_ioffset().();
96 let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(dst_info) = self.dst_info_wallrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]dst_info_wall().(year) else {
97 return IAmbiguousOffsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#::Unambiguousrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#Unambiguous# { offsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#Unambiguous#offset.: std_offset };
98 };
99 let dst_offset = dst_info.offsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`DstInfo<'a, ABBREV>`]offset().().to_ioffsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixOffset]to_ioffset().();
100 let diff = dst_offset.secondrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IOffset#second. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().std_offset.secondrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IOffset#second.;
101 // When the difference between DST and standard is positive, that means
102 // STD->DST results in a gap while DST->STD results in a fold. However,
103 // when the difference is negative, that means STD->DST results in a
104 // fold while DST->STD results in a gap. The former is by far the most
105 // common. The latter is a bit weird, but real cases do exist. For
106 // example, Dublin has DST in winter (UTC+01) and STD in the summer
107 // (UTC+00).
108 //
109 // When the difference is zero, then we have a weird POSIX time zone
110 // where a DST transition rule was specified, but was set to explicitly
111 // be the same as STD. In this case, there can be no ambiguity. (The
112 // zero case is strictly redundant. Both the diff < 0 and diff > 0
113 // cases handle the zero case correctly. But we write it out for
114 // clarity.)
115 if diff rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialEq<Self>`]eq().0 {
116 debug_assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/debug_assert_eq!!(std_offset, dst_offset);
117 IAmbiguousOffsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#::Unambiguousrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#Unambiguous# { offsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#Unambiguous#offset.: std_offset }
118 } else if diff.is_negativerust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[i32]is_negative().() {
119 // For DST transitions that always move behind one hour, ambiguous
120 // timestamps only occur when the given civil datetime falls in the
121 // standard time range.
122 if dst_info.in_dstrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`DstInfo<'a, ABBREV>`]in_dst().(dt) {
123 IAmbiguousOffsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#::Unambiguousrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#Unambiguous# { offsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#Unambiguous#offset.: dst_offset }
124 } else {
125 let fold_start = dst_info.startrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#start..saturating_add_secondsrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDateTime]saturating_add_seconds().(diff);
126 let gap_end =
127 dst_info.endrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#end..saturating_add_secondsrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDateTime]saturating_add_seconds().(diff.saturating_negrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[i32]saturating_neg().());
128 if fold_start rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#le().dt && dt rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#lt().dst_info.startrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#start. {
129 IAmbiguousOffsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#::Foldrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#Fold# {
130 beforerust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#Fold#before.: std_offset,
131 afterrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#Fold#after.: dst_offset,
132 }
133 } else if dst_info.endrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#end. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#le().dt && dt rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#lt().gap_end {
134 IAmbiguousOffsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#::Gaprust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#Gap# {
135 beforerust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#Gap#before.: dst_offset,
136 afterrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#Gap#after.: std_offset,
137 }
138 } else {
139 IAmbiguousOffsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#::Unambiguousrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#Unambiguous# { offsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#Unambiguous#offset.: std_offset }
140 }
141 }
142 } else {
143 // For DST transitions that always move ahead one hour, ambiguous
144 // timestamps only occur when the given civil datetime falls in the
145 // DST range.
146 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().dst_info.in_dstrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`DstInfo<'a, ABBREV>`]in_dst().(dt) {
147 IAmbiguousOffsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#::Unambiguousrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#Unambiguous# { offsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#Unambiguous#offset.: std_offset }
148 } else {
149 // PERF: I wonder if it makes sense to pre-compute these?
150 // Probably not, because we have to do it based on year of
151 // datetime given. But if we ever add a "caching" layer for
152 // POSIX time zones, then it might be worth adding these to it.
153 let gap_end = dst_info.startrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#start..saturating_add_secondsrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDateTime]saturating_add_seconds().(diff);
154 let fold_start =
155 dst_info.endrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#end..saturating_add_secondsrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDateTime]saturating_add_seconds().(diff.saturating_negrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[i32]saturating_neg().());
156 if dst_info.startrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#start. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#le().dt && dt rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#lt().gap_end {
157 IAmbiguousOffsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#::Gaprust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#Gap# {
158 beforerust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#Gap#before.: std_offset,
159 afterrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#Gap#after.: dst_offset,
160 }
161 } else if fold_start rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#le().dt && dt rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#lt().dst_info.endrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#end. {
162 IAmbiguousOffsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#::Foldrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#Fold# {
163 beforerust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#Fold#before.: dst_offset,
164 afterrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#Fold#after.: std_offset,
165 }
166 } else {
167 IAmbiguousOffsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#::Unambiguousrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#Unambiguous# { offsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IAmbiguousOffset#Unambiguous#offset.: dst_offset }
168 }
169 }
170 }
171 }
172
173 /// Returns the timestamp of the most recent time zone transition prior
174 /// to the timestamp given. If one doesn't exist, `None` is returned.
175 pub(craterust-analyzer cargo jiff-static 0.2.16 crate/) fn previous_transitionrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]previous_transition().(
176 &self,
177 timestamp: ITimestamprust-analyzer cargo jiff-static 0.2.16 shared/util/itime/ITimestamp#,
178 ) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<(ITimestamprust-analyzer cargo jiff-static 0.2.16 shared/util/itime/ITimestamp#, IOffsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IOffset#, &'_ str, bool)> {
179 let dt = timestamp.to_datetimerust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[ITimestamp]to_datetime().(IOffsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IOffset#::UTCrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IOffset]UTC.);
180 let dst_info = self.dst_info_utcrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]dst_info_utc().(dt.daterust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDateTime#date..yearrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate#year.)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][Try]branch().;
181 let (earlier, later) = dst_info.orderedrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`DstInfo<'a, ABBREV>`]ordered().();
182 let (prev, dst_info) = if dt rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#gt().later {
183 (later, dst_info)
184 } else if dt rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#gt().earlier {
185 (earlier, dst_info)
186 } else {
187 let prev_year = dt.daterust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDateTime#date..prev_yearrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDate]prev_year().().okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]ok().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][Try]branch().;
188 let dst_info = self.dst_info_utcrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]dst_info_utc().(prev_year)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][Try]branch().;
189 let (_, later) = dst_info.orderedrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`DstInfo<'a, ABBREV>`]ordered().();
190 (later, dst_info)
191 };
192
193 let timestamp = prev.to_timestamp_checkedrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDateTime]to_timestamp_checked().(IOffsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IOffset#::UTCrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IOffset]UTC.)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][Try]branch().;
194 let dt = timestamp.to_datetimerust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[ITimestamp]to_datetime().(IOffsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IOffset#::UTCrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IOffset]UTC.);
195 let (offset, abbrev, dst) = if dst_info.in_dstrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`DstInfo<'a, ABBREV>`]in_dst().(dt) {
196 (dst_info.offsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`DstInfo<'a, ABBREV>`]offset().(), dst_info.dstrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#dst..abbrevrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#abbrev..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/AsRef#as_ref().(), true)
197 } else {
198 (&self.std_offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#std_offset., self.std_abbrevrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#std_abbrev..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/AsRef#as_ref().(), false)
199 };
200 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#((timestamp, offset.to_ioffsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixOffset]to_ioffset().(), abbrev, dst))
201 }
202
203 /// Returns the timestamp of the soonest time zone transition after the
204 /// timestamp given. If one doesn't exist, `None` is returned.
205 pub(craterust-analyzer cargo jiff-static 0.2.16 crate/) fn next_transitionrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]next_transition().(
206 &self,
207 timestamp: ITimestamprust-analyzer cargo jiff-static 0.2.16 shared/util/itime/ITimestamp#,
208 ) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<(ITimestamprust-analyzer cargo jiff-static 0.2.16 shared/util/itime/ITimestamp#, IOffsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IOffset#, &'_ str, bool)> {
209 let dt = timestamp.to_datetimerust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[ITimestamp]to_datetime().(IOffsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IOffset#::UTCrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IOffset]UTC.);
210 let dst_info = self.dst_info_utcrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]dst_info_utc().(dt.daterust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDateTime#date..yearrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate#year.)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][Try]branch().;
211 let (earlier, later) = dst_info.orderedrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`DstInfo<'a, ABBREV>`]ordered().();
212 let (next, dst_info) = if dt rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#lt().earlier {
213 (earlier, dst_info)
214 } else if dt rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#lt().later {
215 (later, dst_info)
216 } else {
217 let next_year = dt.daterust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDateTime#date..next_yearrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDate]next_year().().okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]ok().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][Try]branch().;
218 let dst_info = self.dst_info_utcrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]dst_info_utc().(next_year)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][Try]branch().;
219 let (earlier, _) = dst_info.orderedrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`DstInfo<'a, ABBREV>`]ordered().();
220 (earlier, dst_info)
221 };
222
223 let timestamp = next.to_timestamp_checkedrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDateTime]to_timestamp_checked().(IOffsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IOffset#::UTCrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IOffset]UTC.)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][Try]branch().;
224 let dt = timestamp.to_datetimerust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[ITimestamp]to_datetime().(IOffsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IOffset#::UTCrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IOffset]UTC.);
225 let (offset, abbrev, dst) = if dst_info.in_dstrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`DstInfo<'a, ABBREV>`]in_dst().(dt) {
226 (dst_info.offsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`DstInfo<'a, ABBREV>`]offset().(), dst_info.dstrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#dst..abbrevrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#abbrev..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/AsRef#as_ref().(), true)
227 } else {
228 (&self.std_offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#std_offset., self.std_abbrevrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#std_abbrev..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/AsRef#as_ref().(), false)
229 };
230 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#((timestamp, offset.to_ioffsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixOffset]to_ioffset().(), abbrev, dst))
231 }
232
233 /// Returns the range in which DST occurs.
234 ///
235 /// The civil datetimes returned are in UTC. This is useful for determining
236 /// whether a timestamp is in DST or not.
237 fn dst_info_utcrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]dst_info_utc().(&self, year: i16) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<DstInforust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#<'_, ABBREV>> {
238 let dst = self.dstrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#dst..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][Try]branch().;
239 // DST time starts with respect to standard time, so offset it by the
240 // standard offset.
241 let start =
242 dst.rulerust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#rule..startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start..to_datetimerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixDayTime]to_datetime().(year, self.std_offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#std_offset..to_ioffsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixOffset]to_ioffset().());
243 // DST time ends with respect to DST time, so offset it by the DST
244 // offset.
245 let mut end = dst.rulerust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#rule..endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end..to_datetimerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixDayTime]to_datetime().(year, dst.offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#offset..to_ioffsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixOffset]to_ioffset().());
246 // This is a whacky special case when DST is permanent, but the math
247 // using to calculate the start/end datetimes ends up leaving a gap
248 // for standard time to appear. In which case, it's possible for a
249 // timestamp at the end of a calendar year to get standard time when
250 // it really should be DST.
251 //
252 // We detect this case by re-interpreting the end of the boundary using
253 // the standard offset. If we get a datetime that is in a different
254 // year, then it follows that standard time is actually impossible to
255 // occur.
256 //
257 // These weird POSIX time zones can occur as the TZ strings in
258 // a TZif file compiled using rearguard semantics. For example,
259 // `Africa/Casablanca` has:
260 //
261 // XXX-2<+01>-1,0/0,J365/23
262 //
263 // Notice here that DST is actually one hour *behind* (it is usually
264 // one hour *ahead*) _and_ it ends at 23:00:00 on the last day of the
265 // year. But if it ends at 23:00, then jumping to standard time moves
266 // the clocks *forward*. Which would bring us to 00:00:00 on the first
267 // of the next year... but that is when DST begins! Hence, DST is
268 // permanent.
269 //
270 // Ideally, this could just be handled by our math automatically. But
271 // I couldn't figure out how to make it work. In particular, in the
272 // above example for year 2087, we get
273 //
274 // start == 2087-01-01T00:00:00Z
275 // end == 2087-12-31T22:00:00Z
276 //
277 // Which leaves a two hour gap for a timestamp to get erroneously
278 // categorized as standard time.
279 //
280 // ... so we special case this. We could pre-compute whether a POSIX
281 // time zone is in permanent DST at construction time, but it's not
282 // obvious to me that it's worth it. Especially since this is an
283 // exceptionally rare case.
284 //
285 // Note that I did try to consult tzcode's (incredibly inscrutable)
286 // `localtime` implementation to figure out how they deal with it. At
287 // first, it looks like they don't have any special handling for this
288 // case. But looking more closely, they skip any time zone transitions
289 // generated by POSIX time zones whose rule spans more than 1 year:
290 //
291 // https://github.com/eggert/tz/blob/8d65db9786753f3b263087e31c59d191561d63e3/localtime.c#L1717-L1735
292 //
293 // By just ignoring them, I think it achieves the desired effect of
294 // permanent DST. But I'm not 100% confident in my understanding of
295 // the code.
296 if start.daterust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDateTime#date..monthrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate#month. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialEq<Self>`]eq().1
297 && start.daterust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDateTime#date..dayrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate#day. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialEq<Self>`]eq().1
298 && start.timerust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDateTime#time. rust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[ITime][`PartialEq<Self>`]eq().==rust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[ITime][`PartialEq<Self>`]eq(). rust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[ITime][`PartialEq<Self>`]eq().ITimerust-analyzer cargo jiff-static 0.2.16 shared/util/itime/ITime#::MINrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[ITime]MIN.
299 // NOTE: This should come last because it is potentially expensive.
300 && year
301 !=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i16][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i16][`PartialEq<Self>`]ne().end.saturating_add_secondsrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDateTime]saturating_add_seconds().(self.std_offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#std_offset..secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.).daterust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDateTime#date..yearrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate#year.
302 {
303 end = IDateTimerust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDateTime# {
304 daterust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDateTime#date.: IDaterust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate# { yearrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate#year., monthrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate#month.: 12, dayrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate#day.: 31 },
305 timerust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDateTime#time.: ITimerust-analyzer cargo jiff-static 0.2.16 shared/util/itime/ITime#::MAXrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[ITime]MAX.,
306 };
307 }
308 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(DstInforust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo# { dstrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#dst., startrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#start., endrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#end. })
309 }
310
311 /// Returns the range in which DST occurs.
312 ///
313 /// The civil datetimes returned are in "wall clock time." That is, they
314 /// represent the transitions as they are seen from humans reading a clock
315 /// within the geographic location of that time zone.
316 fn dst_info_wallrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]dst_info_wall().(&self, year: i16) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<DstInforust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#<'_, ABBREV>> {
317 let dst = self.dstrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#dst..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][Try]branch().;
318 // POSIX time zones express their DST transitions in terms of wall
319 // clock time. Since this method specifically is returning wall
320 // clock times, we don't want to offset our datetimes at all.
321 let start = dst.rulerust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#rule..startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start..to_datetimerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixDayTime]to_datetime().(year, IOffsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IOffset#::UTCrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IOffset]UTC.);
322 let end = dst.rulerust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#rule..endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end..to_datetimerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixDayTime]to_datetime().(year, IOffsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IOffset#::UTCrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IOffset]UTC.);
323 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(DstInforust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo# { dstrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#dst., startrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#start., endrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#end. })
324 }
325
326 /// Returns the DST transition rule. This panics if this time zone doesn't
327 /// have DST.
328 #[cfg(test)]
329 fn rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]rule().(&self) -> &PosixRulerust-analyzer cargo jiff-static 0.2.16 shared/PosixRule# {
330 &self.dstrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#dst..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().().rulerust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#rule.
331 }
332 }
333
334 impl<ABBREV: AsRefrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/AsRef#<str>> corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display# for PosixTimeZonerust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#<ABBREV> {
335 fn fmtrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`][Display]fmt().(&self, f: &mut corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#) -> corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# {
336 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(
337 f,
338 "{}{}",
339 AbbreviationDisplayrust-analyzer cargo jiff-static 0.2.16 shared/posix/AbbreviationDisplay#(self.std_abbrevrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#std_abbrev..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/AsRef#as_ref().()),
340 self.std_offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#std_offset.
341 )?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
342 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(ref dst) = self.dstrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#dst. {
343 dst.displayrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixDst<ABBREV>`]display().(&self.std_offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#std_offset., f)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
344 }
345 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(())
346 }
347 }
348
349 impl<ABBREV: AsRefrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/AsRef#<str>> PosixDstrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#<ABBREV> {
350 fn displayrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixDst<ABBREV>`]display().(
351 &self,
352 std_offset: &PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#,
353 f: &mut corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#,
354 ) -> corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# {
355 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "{}", AbbreviationDisplayrust-analyzer cargo jiff-static 0.2.16 shared/posix/AbbreviationDisplay#(self.abbrevrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#abbrev..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/AsRef#as_ref().()))?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
356 // The overwhelming common case is that DST is exactly one hour ahead
357 // of standard time. So common that this is the default. So don't write
358 // the offset if we don't need to.
359 let default = PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.: std_offset.secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().3600 };
360 if self.offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#offset. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().default {
361 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "{}", self.offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#offset.)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
362 }
363 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, ",{}", self.rulerust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#rule.)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
364 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(())
365 }
366 }
367
368 impl corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display# for PosixRulerust-analyzer cargo jiff-static 0.2.16 shared/PosixRule# {
369 fn fmtrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixRule][Display]fmt().(&self, f: &mut corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#) -> corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# {
370 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "{},{}", self.startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start., self.endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end.)
371 }
372 }
373
374 impl PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
375 /// Turns this POSIX datetime spec into a civil datetime in the year given
376 /// with the given offset. The datetimes returned are offset by the given
377 /// offset. For wall clock time, an offset of `0` should be given. For
378 /// UTC time, the offset (standard or DST) corresponding to this time
379 /// spec should be given.
380 ///
381 /// The datetime returned is guaranteed to have a year component equal
382 /// to the year given. This guarantee is upheld even when the datetime
383 /// specification (combined with the offset) would extend past the end of
384 /// the year (or before the start of the year). In this case, the maximal
385 /// (or minimal) datetime for the given year is returned.
386 pub(craterust-analyzer cargo jiff-static 0.2.16 crate/) fn to_datetimerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixDayTime]to_datetime().(&self, year: i16, offset: IOffsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IOffset#) -> IDateTimerust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDateTime# {
387 let mkmin = || IDateTimerust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDateTime# {
388 daterust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDateTime#date.: IDaterust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate# { yearrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate#year., monthrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate#month.: 1, dayrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate#day.: 1 },
389 timerust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDateTime#time.: ITimerust-analyzer cargo jiff-static 0.2.16 shared/util/itime/ITime#::MINrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[ITime]MIN.,
390 };
391 let mkmax = || IDateTimerust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDateTime# {
392 daterust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDateTime#date.: IDaterust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate# { yearrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate#year., monthrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate#month.: 12, dayrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate#day.: 31 },
393 timerust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDateTime#time.: ITimerust-analyzer cargo jiff-static 0.2.16 shared/util/itime/ITime#::MAXrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[ITime]MAX.,
394 };
395 let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(date) = self.daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date..to_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixDay]to_date().(year) else { return mkmax() };
396 // The range on `self.time` is `-604799..=604799`, and the range
397 // on `offset.second` is `-93599..=93599`. Therefore, subtracting
398 // them can never overflow an `i32`.
399 let offset = self.timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time..secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Sub<Self>`]sub().offset.secondrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IOffset#second.;
400 // If the time goes negative or above 86400, then we might have
401 // to adjust our date.
402 let days = offset.div_euclidrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[i32]div_euclid().(86400);
403 let second = offset.rem_euclidrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[i32]rem_euclid().(86400);
404
405 let Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(date) = date.checked_add_daysrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDate]checked_add_days().(days) else {
406 return if offset rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]lt().0 { mkmin() } else { mkmax() };
407 };
408 if date.yearrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate#year. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i16][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i16][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i16][`PartialOrd<Self>`]lt().year {
409 mkmin()
410 } else if date.yearrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate#year. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i16][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i16][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i16][`PartialOrd<Self>`]gt().year {
411 mkmax()
412 } else {
413 let time = ITimeSecondrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/ITimeSecond# { secondrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/ITimeSecond#second. }.to_timerust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[ITimeSecond]to_time().();
414 IDateTimerust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDateTime# { daterust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDateTime#date., timerust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDateTime#time. }
415 }
416 }
417 }
418
419 impl corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display# for PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
420 fn fmtrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixDayTime][Display]fmt().(&self, f: &mut corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#) -> corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# {
421 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "{}", self.daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date.)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
422 // This is the default time, so don't write it if we
423 // don't need to.
424 if self.timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#::DEFAULTrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixTime]DEFAULT. {
425 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "/{}", self.timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
426 }
427 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(())
428 }
429 }
430
431 impl PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay# {
432 /// Convert this date specification to a civil date in the year given.
433 ///
434 /// If this date specification couldn't be turned into a date in the year
435 /// given, then `None` is returned. This happens when `366` is given as
436 /// a day, but the year given is not a leap year. In this case, callers may
437 /// want to assume a datetime that is maximal for the year given.
438 fn to_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixDay]to_date().(&self, year: i16) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<IDaterust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate#> {
439 match *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().self {
440 PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::JulianOnerust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#JulianOne#(day) => {
441 // Parsing validates that our day is 1-365 which will always
442 // succeed for all possible year values. That is, every valid
443 // year has a December 31.
444 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(
445 IDaterust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate#::from_day_of_year_no_leaprust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDate]from_day_of_year_no_leap().(year, day)
446 .expectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]expect().("Julian `J day` should be in bounds"),
447 )
448 }
449 PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::JulianZerorust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#JulianZero#(day) => {
450 // OK because our value for `day` is validated to be `0..=365`,
451 // and since it is an `i16`, it is always valid to add 1.
452 //
453 // Also, while `day+1` is guaranteed to be in `1..=366`, it is
454 // possible that `366` is invalid, for when `year` is not a
455 // leap year. In this case, we throw our hands up, and ask the
456 // caller to make a decision for how to deal with it. Why does
457 // POSIX go out of its way to specifically not specify behavior
458 // in error cases?
459 IDaterust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate#::from_day_of_yearrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDate]from_day_of_year().(year, day rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i16][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i16][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i16][`Add<Self>`]add().1).okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]ok().()
460 }
461 PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::WeekdayOfMonthrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth# { monthrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#month., weekrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#week., weekdayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#weekday. } => {
462 let weekday = IWeekdayrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IWeekday#::from_sunday_zero_offsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IWeekday]from_sunday_zero_offset().(weekday);
463 let first = IDaterust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate# { yearrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate#year., monthrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate#month., dayrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate#day.: 1 };
464 let week = if week rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialEq<Self>`]eq().5 { -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i8][Neg]neg().1 } else { week };
465 debug_assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/debug_assert!!(week == -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i8][Neg]neg().1 || (1..=4).containsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/impl#[`RangeInclusive<Idx>`]contains().(&week));
466 // This is maybe non-obvious, but this will always succeed
467 // because it can only fail when the week number is one of
468 // {-5, 0, 5}. Since we've validated that 'week' is in 1..=5,
469 // we know it can't be 0. Moreover, because of the conditional
470 // above and since `5` actually means "last weekday of month,"
471 // that case will always translate to `-1`.
472 //
473 // Also, I looked at how other libraries deal with this case,
474 // and almost all of them just do a bunch of inline hairy
475 // arithmetic here. I suppose I could be reduced to such
476 // things if perf called for it, but we have a nice civil date
477 // abstraction. So use it, god damn it. (Well, we did, and now
478 // we have a lower level IDate abstraction. But it's still
479 // an abstraction!)
480 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(
481 first
482 .nth_weekday_of_monthrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDate]nth_weekday_of_month().(week, weekday)
483 .expectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]expect().("nth weekday always exists"),
484 )
485 }
486 }
487 }
488 }
489
490 impl corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display# for PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay# {
491 fn fmtrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixDay][Display]fmt().(&self, f: &mut corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#) -> corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# {
492 match *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().self {
493 PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::JulianOnerust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#JulianOne#(n) => writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "J{n}"),
494 PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::JulianZerorust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#JulianZero#(n) => writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "{n}"),
495 PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::WeekdayOfMonthrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth# { monthrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#month., weekrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#week., weekdayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#weekday. } => {
496 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "M{month}.{week}.{weekday}")
497 }
498 }
499 }
500 }
501
502 impl PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime# {
503 const DEFAULTrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixTime]DEFAULT.: PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime# = PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.: 2 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul().60 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul().60 };
504 }
505
506 impl corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display# for PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime# {
507 fn fmtrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixTime][Display]fmt().(&self, f: &mut corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#) -> corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# {
508 if self.secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second..is_negativerust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[i32]is_negative().() {
509 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "-")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
510 // The default is positive, so when
511 // positive, we write nothing.
512 }
513 let second = self.secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second..unsigned_absrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[i32]unsigned_abs().();
514 let h = second rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Div<Self>`]div().3600;
515 let m = (second rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Div<Self>`]div().60) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Rem<Self>`]rem().%rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Rem<Self>`]rem(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Rem<Self>`]rem().60;
516 let s = second rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Rem<Self>`]rem().%rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Rem<Self>`]rem(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Rem<Self>`]rem().60;
517 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "{h}")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
518 if m rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().0 || s rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().0 {
519 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, ":{m:02}")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
520 if s rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().0 {
521 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, ":{s:02}")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
522 }
523 }
524 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(())
525 }
526 }
527
528 impl PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset# {
529 fn to_ioffsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixOffset]to_ioffset().(&self) -> IOffsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IOffset# {
530 IOffsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IOffset# { secondrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IOffset#second.: self.secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second. }
531 }
532 }
533
534 impl corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display# for PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset# {
535 fn fmtrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixOffset][Display]fmt().(&self, f: &mut corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#) -> corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# {
536 // Yes, this is backwards. Blame POSIX.
537 // N.B. `+` is the default, so we don't
538 // need to write that out.
539 if self.secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i32][`PartialOrd<Self>`]gt().0 {
540 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "-")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
541 }
542 let second = self.secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second..unsigned_absrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[i32]unsigned_abs().();
543 let h = second rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Div<Self>`]div().3600;
544 let m = (second rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Div<Self>`]div().60) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Rem<Self>`]rem().%rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Rem<Self>`]rem(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Rem<Self>`]rem().60;
545 let s = second rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Rem<Self>`]rem().%rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Rem<Self>`]rem(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u32][`Rem<Self>`]rem().60;
546 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "{h}")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
547 if m rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().0 || s rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().0 {
548 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, ":{m:02}")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
549 if s rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().0 {
550 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, ":{s:02}")?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
551 }
552 }
553 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(())
554 }
555 }
556
557 /// A helper type for formatting a time zone abbreviation.
558 ///
559 /// Basically, this will write the `<` and `>` quotes if necessary, and
560 /// otherwise write out the abbreviation in its unquoted form.
561 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:)]
562 struct AbbreviationDisplayrust-analyzer cargo jiff-static 0.2.16 shared/posix/AbbreviationDisplay#<S>(S);
563
564 impl<S: AsRefrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/AsRef#<str>> corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display# for AbbreviationDisplayrust-analyzer cargo jiff-static 0.2.16 shared/posix/AbbreviationDisplay#<S> {
565 fn fmtrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`AbbreviationDisplay<S>`][Display]fmt().(&self, f: &mut corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#) -> corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# {
566 let s = self.0rust-analyzer cargo jiff-static 0.2.16 shared/posix/AbbreviationDisplay#0..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/AsRef#as_ref().();
567 if s.charsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]chars().().anyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#any().(|ch| ch rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[char][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[char][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[char][`PartialEq<Self>`]eq().'+' || ch rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[char][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[char][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[char][`PartialEq<Self>`]eq().'-') {
568 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "<{s}>")
569 } else {
570 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "{s}")
571 }
572 }
573 }
574
575 /// The daylight saving time (DST) info for a POSIX time zone in a particular
576 /// year.
577 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:)]
578 struct DstInforust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#<'a, ABBREV> {
579 /// The DST transition rule that generated this info.
580 dstrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#dst.: &'a PosixDstrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#<ABBREV>,
581 /// The start time (inclusive) that DST begins.
582 ///
583 /// Note that this may be greater than `end`. This tends to happen in the
584 /// southern hemisphere.
585 ///
586 /// Note also that this may be in UTC or in wall clock civil
587 /// time. It depends on whether `PosixTimeZone::dst_info_utc` or
588 /// `PosixTimeZone::dst_info_wall` was used.
589 startrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#start.: IDateTimerust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDateTime#,
590 /// The end time (exclusive) that DST ends.
591 ///
592 /// Note that this may be less than `start`. This tends to happen in the
593 /// southern hemisphere.
594 ///
595 /// Note also that this may be in UTC or in wall clock civil
596 /// time. It depends on whether `PosixTimeZone::dst_info_utc` or
597 /// `PosixTimeZone::dst_info_wall` was used.
598 endrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#end.: IDateTimerust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDateTime#,
599 }
600
601 impl<'a, ABBREV> DstInforust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#<'a, ABBREV> {
602 /// Returns true if and only if the given civil datetime ought to be
603 /// considered in DST.
604 fn in_dstrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`DstInfo<'a, ABBREV>`]in_dst().(&self, utc_dt: IDateTimerust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDateTime#) -> bool {
605 if self.startrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#start. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#le().self.endrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#end. {
606 self.startrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#start. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#le().utc_dt && utc_dt rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#lt().self.endrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#end.
607 } else {
608 !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().(self.endrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#end. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#le().utc_dt && utc_dt rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#lt().self.startrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#start.)
609 }
610 }
611
612 /// Returns the earlier and later times for this DST info.
613 fn orderedrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`DstInfo<'a, ABBREV>`]ordered().(&self) -> (IDateTimerust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDateTime#, IDateTimerust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDateTime#) {
614 if self.startrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#start. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#le().self.endrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#end. {
615 (self.startrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#start., self.endrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#end.)
616 } else {
617 (self.endrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#end., self.startrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#start.)
618 }
619 }
620
621 /// Returns the DST offset.
622 fn offsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`DstInfo<'a, ABBREV>`]offset().(&self) -> &PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset# {
623 &self.dstrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#dst..offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#offset.
624 }
625 }
626
627 /// A parser for POSIX time zones.
628 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:)]
629 struct Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#<'s> {
630 /// The `TZ` string that we're parsing.
631 tzrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#tz.: &'s [u8],
632 /// The parser's current position in `tz`.
633 posrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#pos.: corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::cellrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cell/::Cellrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cell/Cell#<usize>,
634 /// Whether to use IANA rules, i.e., when parsing a TZ string in a TZif
635 /// file of version 3 or greater. From `tzfile(5)`:
636 ///
637 /// > First, the hours part of its transition times may be signed and range
638 /// > from `-167` through `167` instead of the POSIX-required unsigned
639 /// > values from `0` through `24`. Second, DST is in effect all year if
640 /// > it starts January 1 at 00:00 and ends December 31 at 24:00 plus the
641 /// > difference between daylight saving and standard time.
642 ///
643 /// At time of writing, I don't think I understand the significance of
644 /// the second part above. (RFC 8536 elaborates that it is meant to be an
645 /// explicit clarification of something that POSIX itself implies.) But the
646 /// first part is clear: it permits the hours to be a bigger range.
647 ianav3plusrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#ianav3plus.: bool,
648 }
649
650 impl<'s> Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#<'s> {
651 /// Create a new parser for extracting a POSIX time zone from the given
652 /// bytes.
653 fn newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().<B: ?Sizedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sized# + AsRefrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/AsRef#<[u8]>>(tz: &'s B) -> Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#<'s> {
654 Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser# {
655 tzrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#tz.: tz.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/AsRef#as_ref().(),
656 posrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#pos.: corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::cellrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cell/::Cellrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cell/Cell#::newrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cell/impl#[`Cell<T>`]new().(0),
657 ianav3plusrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#ianav3plus.: false,
658 }
659 }
660
661 /// Parses a POSIX time zone from the current position of the parser and
662 /// ensures that the entire TZ string corresponds to a single valid POSIX
663 /// time zone.
664 fn parserust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse().(&self) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<PosixTimeZonerust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#<Abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/util/array_str/Abbreviation#>, Errorrust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error#> {
665 let (time_zone, remaining) = self.parse_prefixrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_prefix().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
666 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().remaining.is_emptyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]is_empty().() {
667 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
668 "expected entire TZ string to be a valid POSIX \
669 time zone, but found `{}` after what would otherwise \
670 be a valid POSIX TZ string",
671 Bytesrust-analyzer cargo jiff-static 0.2.16 shared/util/escape/Bytes#(remaining),
672 ));
673 }
674 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(time_zone)
675 }
676
677 /// Parses a POSIX time zone from the current position of the parser and
678 /// returns the remaining input.
679 fn parse_prefixrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_prefix().(
680 &self,
681 ) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(PosixTimeZonerust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#<Abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/util/array_str/Abbreviation#>, &'s [u8]), Errorrust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error#> {
682 let time_zone = self.parse_posix_time_zonerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_time_zone().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
683 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#((time_zone, self.remainingrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]remaining().()))
684 }
685
686 /// Parse a POSIX time zone from the current position of the parser.
687 ///
688 /// Upon success, the parser will be positioned immediately following the
689 /// TZ string.
690 fn parse_posix_time_zonerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_time_zone().(
691 &self,
692 ) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<PosixTimeZonerust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#<Abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/util/array_str/Abbreviation#>, Errorrust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error#> {
693 if self.is_donerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]is_done().() {
694 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
695 "an empty string is not a valid POSIX time zone"
696 ));
697 }
698 let std_abbrev = self
699 .parse_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_abbreviation().()
700 .map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|e| errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!("failed to parse standard abbreviation: {e}"))?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
701 let std_offset = self
702 .parse_posix_offsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_offset().()
703 .map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|e| errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!("failed to parse standard offset: {e}"))?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
704 let mut dst = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#;
705 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.is_donerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]is_done().()
706 && (self.byterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]byte().().is_ascii_alphabeticrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u8]is_ascii_alphabetic().() || self.byterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]byte().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().b'<')
707 {
708 dst = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(self.parse_posix_dstrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_dst().(&std_offset)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().);
709 }
710 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(PosixTimeZonerust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone# { std_abbrevrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#std_abbrev., std_offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#std_offset., dstrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#dst. })
711 }
712
713 /// Parse a DST zone with an optional explicit transition rule.
714 ///
715 /// This assumes the parser is positioned at the first byte of the DST
716 /// abbreviation.
717 ///
718 /// Upon success, the parser will be positioned immediately after the end
719 /// of the DST transition rule (which might just be the abbreviation, but
720 /// might also include explicit start/end datetime specifications).
721 fn parse_posix_dstrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_dst().(
722 &self,
723 std_offset: &PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#,
724 ) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<PosixDstrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#<Abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/util/array_str/Abbreviation#>, Errorrust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error#> {
725 let abbrev = self
726 .parse_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_abbreviation().()
727 .map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|e| errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!("failed to parse DST abbreviation: {e}"))?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
728 if self.is_donerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]is_done().() {
729 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
730 "found DST abbreviation `{abbrev}`, but no transition \
731 rule (this is technically allowed by POSIX, but has \
732 unspecified behavior)",
733 ));
734 }
735 // This is the default: one hour ahead of standard time. We may
736 // override this if the DST portion specifies an offset. (But it
737 // usually doesn't.)
738 let mut offset = PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.: std_offset.secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add().3600 };
739 if self.byterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]byte().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().b',' {
740 offset = self
741 .parse_posix_offsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_offset().()
742 .map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|e| errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!("failed to parse DST offset: {e}"))?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
743 if self.is_donerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]is_done().() {
744 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
745 "found DST abbreviation `{abbrev}` and offset \
746 `{offset}s`, but no transition rule (this is \
747 technically allowed by POSIX, but has \
748 unspecified behavior)",
749 offset = offset.secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.,
750 ));
751 }
752 }
753 if self.byterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]byte().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().b',' {
754 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
755 "after parsing DST offset in POSIX time zone string, \
756 found `{}` but expected a ','",
757 Byterust-analyzer cargo jiff-static 0.2.16 shared/util/escape/Byte#(self.byterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]byte().()),
758 ));
759 }
760 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.bumprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]bump().() {
761 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
762 "after parsing DST offset in POSIX time zone string, \
763 found end of string after a trailing ','",
764 ));
765 }
766 let rule = self.parse_rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_rule().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
767 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(PosixDstrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst# { abbrevrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#abbrev., offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#offset., rulerust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#rule. })
768 }
769
770 /// Parse a time zone abbreviation.
771 ///
772 /// This assumes the parser is positioned at the first byte of
773 /// the abbreviation. This is either the first character in the
774 /// abbreviation, or the opening quote of a quoted abbreviation.
775 ///
776 /// Upon success, the parser will be positioned immediately following
777 /// the abbreviation name.
778 ///
779 /// The string returned is guaranteed to be no more than 30 bytes.
780 /// (This restriction is somewhat arbitrary, but it's so we can put
781 /// the abbreviation in a fixed capacity array.)
782 fn parse_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_abbreviation().(&self) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/util/array_str/Abbreviation#, Errorrust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error#> {
783 if self.byterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]byte().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]eq().b'<' {
784 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.bumprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]bump().() {
785 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
786 "found opening '<' quote for abbreviation in \
787 POSIX time zone string, and expected a name \
788 following it, but found the end of string instead"
789 ));
790 }
791 self.parse_quoted_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_quoted_abbreviation().()
792 } else {
793 self.parse_unquoted_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_unquoted_abbreviation().()
794 }
795 }
796
797 /// Parses an unquoted time zone abbreviation.
798 ///
799 /// This assumes the parser is position at the first byte in the
800 /// abbreviation.
801 ///
802 /// Upon success, the parser will be positioned immediately after the
803 /// last byte in the abbreviation.
804 ///
805 /// The string returned is guaranteed to be no more than 30 bytes.
806 /// (This restriction is somewhat arbitrary, but it's so we can put
807 /// the abbreviation in a fixed capacity array.)
808 fn parse_unquoted_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_unquoted_abbreviation().(&self) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/util/array_str/Abbreviation#, Errorrust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error#> {
809 let start = self.posrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]pos().();
810 for i in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFrom# {
811 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.byterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]byte().().is_ascii_alphabeticrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u8]is_ascii_alphabetic().() {
812 break;
813 }
814 if i rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]ge().Abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/util/array_str/Abbreviation#::capacityrust-analyzer cargo jiff-static 0.2.16 shared/util/array_str/impl#[`ArrayStr<N>`]capacity().() {
815 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
816 "expected abbreviation with at most {} bytes, \
817 but found a longer abbreviation beginning with `{}`",
818 Abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/util/array_str/Abbreviation#::capacityrust-analyzer cargo jiff-static 0.2.16 shared/util/array_str/impl#[`ArrayStr<N>`]capacity().(),
819 Bytesrust-analyzer cargo jiff-static 0.2.16 shared/util/escape/Bytes#(&self.tzrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#tz.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().start..]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/index/impl#[`[T]`][`Index<I>`]index()...i]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/index/impl#[`[T]`][`Index<I>`]index().),
820 ));
821 }
822 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.bumprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]bump().() {
823 break;
824 }
825 }
826 let end = self.posrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]pos().();
827 let abbrev =
828 corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/::from_utf8rust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/converts/from_utf8().(&self.tzrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#tz.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().start..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#end]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().).map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|_| {
829 // NOTE: I believe this error is technically impossible
830 // since the loop above restricts letters in an
831 // abbreviation to ASCII. So everything from `start` to
832 // `end` is ASCII and thus should be UTF-8. But it doesn't
833 // cost us anything to report an error here in case the
834 // code above evolves somehow.
835 errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
836 "found abbreviation `{}`, but it is not valid UTF-8",
837 Bytesrust-analyzer cargo jiff-static 0.2.16 shared/util/escape/Bytes#(&self.tzrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#tz.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().start..end]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().),
838 )
839 })?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
840 if abbrev.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]len().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt().3 {
841 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
842 "expected abbreviation with 3 or more bytes, but found \
843 abbreviation {:?} with {} bytes",
844 abbrev,
845 abbrev.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]len().(),
846 ));
847 }
848 // OK because we verified above that the abbreviation
849 // does not exceed `Abbreviation::capacity`.
850 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/util/array_str/Abbreviation#::newrust-analyzer cargo jiff-static 0.2.16 shared/util/array_str/impl#[`ArrayStr<N>`]new().(abbrev).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().())
851 }
852
853 /// Parses a quoted time zone abbreviation.
854 ///
855 /// This assumes the parser is positioned immediately after the opening
856 /// `<` quote. That is, at the first byte in the abbreviation.
857 ///
858 /// Upon success, the parser will be positioned immediately after the
859 /// closing `>` quote.
860 ///
861 /// The string returned is guaranteed to be no more than 30 bytes.
862 /// (This restriction is somewhat arbitrary, but it's so we can put
863 /// the abbreviation in a fixed capacity array.)
864 fn parse_quoted_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_quoted_abbreviation().(&self) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/util/array_str/Abbreviation#, Errorrust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error#> {
865 let start = self.posrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]pos().();
866 for i in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFrom# {
867 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.byterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]byte().().is_ascii_alphanumericrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u8]is_ascii_alphanumeric().()
868 && self.byterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]byte().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().b'+'
869 && self.byterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]byte().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().b'-'
870 {
871 break;
872 }
873 if i rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]ge().Abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/util/array_str/Abbreviation#::capacityrust-analyzer cargo jiff-static 0.2.16 shared/util/array_str/impl#[`ArrayStr<N>`]capacity().() {
874 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
875 "expected abbreviation with at most {} bytes, \
876 but found a longer abbreviation beginning with `{}`",
877 Abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/util/array_str/Abbreviation#::capacityrust-analyzer cargo jiff-static 0.2.16 shared/util/array_str/impl#[`ArrayStr<N>`]capacity().(),
878 Bytesrust-analyzer cargo jiff-static 0.2.16 shared/util/escape/Bytes#(&self.tzrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#tz.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().start..]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/index/impl#[`[T]`][`Index<I>`]index()...i]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/index/impl#[`[T]`][`Index<I>`]index().),
879 ));
880 }
881 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.bumprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]bump().() {
882 break;
883 }
884 }
885 let end = self.posrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]pos().();
886 let abbrev =
887 corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/::from_utf8rust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/converts/from_utf8().(&self.tzrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#tz.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().start..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#end]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().).map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|_| {
888 // NOTE: I believe this error is technically impossible
889 // since the loop above restricts letters in an
890 // abbreviation to ASCII. So everything from `start` to
891 // `end` is ASCII and thus should be UTF-8. But it doesn't
892 // cost us anything to report an error here in case the
893 // code above evolves somehow.
894 errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
895 "found abbreviation `{}`, but it is not valid UTF-8",
896 Bytesrust-analyzer cargo jiff-static 0.2.16 shared/util/escape/Bytes#(&self.tzrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#tz.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().start..end]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().),
897 )
898 })?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
899 if self.is_donerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]is_done().() {
900 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
901 "found non-empty quoted abbreviation {abbrev:?}, but \
902 did not find expected end-of-quoted abbreviation \
903 '>' character",
904 ));
905 }
906 if self.byterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]byte().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialEq<Self>`]ne().b'>' {
907 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
908 "found non-empty quoted abbreviation {abbrev:?}, but \
909 found `{}` instead of end-of-quoted abbreviation '>' \
910 character",
911 Byterust-analyzer cargo jiff-static 0.2.16 shared/util/escape/Byte#(self.byterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]byte().()),
912 ));
913 }
914 self.bumprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]bump().();
915 if abbrev.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]len().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt().3 {
916 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
917 "expected abbreviation with 3 or more bytes, but found \
918 abbreviation {abbrev:?} with {} bytes",
919 abbrev.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]len().(),
920 ));
921 }
922 // OK because we verified above that the abbreviation
923 // does not exceed `Abbreviation::capacity`.
924 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/util/array_str/Abbreviation#::newrust-analyzer cargo jiff-static 0.2.16 shared/util/array_str/impl#[`ArrayStr<N>`]new().(abbrev).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().())
925 }
926
927 /// Parse a POSIX time offset.
928 ///
929 /// This assumes the parser is positioned at the first byte of the
930 /// offset. This can either be a digit (for a positive offset) or the
931 /// sign of the offset (which must be either `-` or `+`).
932 ///
933 /// Upon success, the parser will be positioned immediately after the
934 /// end of the offset.
935 fn parse_posix_offsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_offset().(&self) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#, Errorrust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error#> {
936 let sign = self
937 .parse_optional_signrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_optional_sign().()
938 .map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|e| {
939 errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
940 "failed to parse sign for time offset \
941 in POSIX time zone string: {e}",
942 )
943 })?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().
944 .unwrap_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or().(1);
945 let hour = self.parse_hour_posixrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_hour_posix().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
946 let (mut minute, mut second) = (0, 0);
947 if self.maybe_byterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]maybe_byte().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][`PartialEq<Self>`]eq().Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(b':') {
948 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.bumprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]bump().() {
949 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
950 "incomplete time in POSIX timezone (missing minutes)",
951 ));
952 }
953 minute = self.parse_minuterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_minute().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
954 if self.maybe_byterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]maybe_byte().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][`PartialEq<Self>`]eq().Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(b':') {
955 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.bumprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]bump().() {
956 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
957 "incomplete time in POSIX timezone (missing seconds)",
958 ));
959 }
960 second = self.parse_secondrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_second().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
961 }
962 }
963 let mut offset = PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.: i32::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[i32][`From<i8>`]from().(hour) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul().3600 };
964 offset.secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().i32::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[i32][`From<i8>`]from().(minute) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul().60;
965 offset.secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().i32::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[i32][`From<i8>`]from().(second);
966 // Yes, we flip the sign, because POSIX is backwards.
967 // For example, `EST5` corresponds to `-05:00`.
968 offset.secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`MulAssign<Self>`]mul_assign().*=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`MulAssign<Self>`]mul_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`MulAssign<Self>`]mul_assign().i32::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[i32][`From<i8>`]from().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i8][Neg]neg().sign);
969 // Must be true because the parsing routines for hours, minutes
970 // and seconds enforce they are in the ranges -24..=24, 0..=59
971 // and 0..=59, respectively.
972 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(
973 -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().89999 <= offset.secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second. && offset.secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second. <= 89999,
974 "POSIX offset seconds {} is out of range",
975 offset.secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.
976 );
977 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(offset)
978 }
979
980 /// Parses a POSIX DST transition rule.
981 ///
982 /// This assumes the parser is positioned at the first byte in the
983 /// rule. That is, it comes immediately after the DST abbreviation or
984 /// its optional offset.
985 ///
986 /// Upon success, the parser will be positioned immediately after the
987 /// DST transition rule. In typical cases, this corresponds to the end
988 /// of the TZ string.
989 fn parse_rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_rule().(&self) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<PosixRulerust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#, Errorrust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error#> {
990 let start = self.parse_posix_datetimerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_datetime().().map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|e| {
991 errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!("failed to parse start of DST transition rule: {e}")
992 })?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
993 if self.maybe_byterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]maybe_byte().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(b',') || !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.bumprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]bump().() {
994 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
995 "expected end of DST rule after parsing the start \
996 of the DST rule"
997 ));
998 }
999 let end = self.parse_posix_datetimerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_datetime().().map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|e| {
1000 errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!("failed to parse end of DST transition rule: {e}")
1001 })?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1002 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(PosixRulerust-analyzer cargo jiff-static 0.2.16 shared/PosixRule# { startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start., endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end. })
1003 }
1004
1005 /// Parses a POSIX datetime specification.
1006 ///
1007 /// This assumes the parser is position at the first byte where a
1008 /// datetime specification is expected to occur.
1009 ///
1010 /// Upon success, the parser will be positioned after the datetime
1011 /// specification. This will either be immediately after the date, or
1012 /// if it's present, the time part of the specification.
1013 fn parse_posix_datetimerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_datetime().(&self) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#, Errorrust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error#> {
1014 let mut daytime = PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
1015 daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date.: self.parse_posix_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_date().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().,
1016 timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.: PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#::DEFAULTrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixTime]DEFAULT.,
1017 };
1018 if self.maybe_byterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]maybe_byte().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(b'/') {
1019 return Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(daytime);
1020 }
1021 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.bumprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]bump().() {
1022 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1023 "expected time specification after '/' following a date
1024 specification in a POSIX time zone DST transition rule",
1025 ));
1026 }
1027 daytime.timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time. = self.parse_posix_timerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_time().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1028 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(daytime)
1029 }
1030
1031 /// Parses a POSIX date specification.
1032 ///
1033 /// This assumes the parser is positioned at the first byte of the date
1034 /// specification. This can be `J` (for one based Julian day without
1035 /// leap days), `M` (for "weekday of month") or a digit starting the
1036 /// zero based Julian day with leap days. This routine will validate
1037 /// that the position points to one of these possible values. That is,
1038 /// the caller doesn't need to parse the `M` or the `J` or the leading
1039 /// digit. The caller should just call this routine when it *expect* a
1040 /// date specification to follow.
1041 ///
1042 /// Upon success, the parser will be positioned immediately after the
1043 /// date specification.
1044 fn parse_posix_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_date().(&self) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#, Errorrust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error#> {
1045 match self.byterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]byte().() {
1046 b'J' => {
1047 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.bumprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]bump().() {
1048 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1049 "expected one-based Julian day after 'J' in date \
1050 specification of a POSIX time zone DST \
1051 transition rule, but got the end of the string \
1052 instead"
1053 ));
1054 }
1055 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::JulianOnerust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#JulianOne#(self.parse_posix_julian_day_no_leaprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_julian_day_no_leap().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().))
1056 }
1057 b'0'..=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeInclusive#b'9' => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::JulianZerorust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#JulianZero#(
1058 self.parse_posix_julian_day_with_leaprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_julian_day_with_leap().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().,
1059 )),
1060 b'M' => {
1061 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.bumprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]bump().() {
1062 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1063 "expected month-week-weekday after 'M' in date \
1064 specification of a POSIX time zone DST \
1065 transition rule, but got the end of the string \
1066 instead"
1067 ));
1068 }
1069 let (month, week, weekday) = self.parse_weekday_of_monthrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_weekday_of_month().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1070 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::WeekdayOfMonthrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth# { monthrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#month., weekrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#week., weekdayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#weekday. })
1071 }
1072 _ => Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1073 "expected 'J', a digit or 'M' at the beginning of a date \
1074 specification of a POSIX time zone DST transition rule, \
1075 but got `{}` instead",
1076 Byterust-analyzer cargo jiff-static 0.2.16 shared/util/escape/Byte#(self.byterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]byte().()),
1077 )),
1078 }
1079 }
1080
1081 /// Parses a POSIX Julian day that does not include leap days
1082 /// (`1 <= n <= 365`).
1083 ///
1084 /// This assumes the parser is positioned just after the `J` and at the
1085 /// first digit of the Julian day. Upon success, the parser will be
1086 /// positioned immediately following the day number.
1087 fn parse_posix_julian_day_no_leaprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_julian_day_no_leap().(&self) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<i16, Errorrust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error#> {
1088 let number = self
1089 .parse_number_with_upto_n_digitsrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_number_with_upto_n_digits().(3)
1090 .map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|e| errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!("invalid one based Julian day: {e}"))?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1091 let number = i16::try_fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[i16][`TryFrom<i32>`]try_from().(number).map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|_| {
1092 errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1093 "one based Julian day `{number}` in POSIX time zone \
1094 does not fit into 16-bit integer"
1095 )
1096 })?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1097 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().(1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i16][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i16][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i16][`PartialOrd<Self>`]le().number && number rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i16][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i16][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i16][`PartialOrd<Self>`]le().365) {
1098 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1099 "parsed one based Julian day `{number}`, \
1100 but one based Julian day in POSIX time zone \
1101 must be in range 1..=365",
1102 ));
1103 }
1104 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(number)
1105 }
1106
1107 /// Parses a POSIX Julian day that includes leap days (`0 <= n <=
1108 /// 365`).
1109 ///
1110 /// This assumes the parser is positioned at the first digit of the
1111 /// Julian day. Upon success, the parser will be positioned immediately
1112 /// following the day number.
1113 fn parse_posix_julian_day_with_leaprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_julian_day_with_leap().(&self) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<i16, Errorrust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error#> {
1114 let number = self
1115 .parse_number_with_upto_n_digitsrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_number_with_upto_n_digits().(3)
1116 .map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|e| errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!("invalid zero based Julian day: {e}"))?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1117 let number = i16::try_fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[i16][`TryFrom<i32>`]try_from().(number).map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|_| {
1118 errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1119 "zero based Julian day `{number}` in POSIX time zone \
1120 does not fit into 16-bit integer"
1121 )
1122 })?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1123 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().(0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i16][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i16][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i16][`PartialOrd<Self>`]le().number && number rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i16][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i16][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i16][`PartialOrd<Self>`]le().365) {
1124 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1125 "parsed zero based Julian day `{number}`, \
1126 but zero based Julian day in POSIX time zone \
1127 must be in range 0..=365",
1128 ));
1129 }
1130 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(number)
1131 }
1132
1133 /// Parses a POSIX "weekday of month" specification.
1134 ///
1135 /// This assumes the parser is positioned just after the `M` byte and
1136 /// at the first digit of the month. Upon success, the parser will be
1137 /// positioned immediately following the "weekday of the month" that
1138 /// was parsed.
1139 ///
1140 /// The tuple returned is month (1..=12), week (1..=5) and weekday
1141 /// (0..=6 with 0=Sunday).
1142 fn parse_weekday_of_monthrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_weekday_of_month().(&self) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(i8, i8, i8), Errorrust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error#> {
1143 let month = self.parse_monthrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_month().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1144 if self.maybe_byterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]maybe_byte().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(b'.') {
1145 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1146 "expected '.' after month `{month}` in \
1147 POSIX time zone rule"
1148 ));
1149 }
1150 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.bumprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]bump().() {
1151 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1152 "expected week after month `{month}` in \
1153 POSIX time zone rule"
1154 ));
1155 }
1156 let week = self.parse_weekrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_week().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1157 if self.maybe_byterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]maybe_byte().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#ne().Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(b'.') {
1158 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1159 "expected '.' after week `{week}` in POSIX time zone rule"
1160 ));
1161 }
1162 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.bumprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]bump().() {
1163 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1164 "expected day-of-week after week `{week}` in \
1165 POSIX time zone rule"
1166 ));
1167 }
1168 let weekday = self.parse_weekdayrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_weekday().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1169 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#((month, week, weekday))
1170 }
1171
1172 /// This parses a POSIX time specification in the format
1173 /// `[+/-]hh?[:mm[:ss]]`.
1174 ///
1175 /// This assumes the parser is positioned at the first `h` (or the
1176 /// sign, if present). Upon success, the parser will be positioned
1177 /// immediately following the end of the time specification.
1178 fn parse_posix_timerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_time().(&self) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#, Errorrust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error#> {
1179 let (sign, hour) = if self.ianav3plusrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#ianav3plus. {
1180 let sign = self
1181 .parse_optional_signrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_optional_sign().()
1182 .map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|e| {
1183 errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1184 "failed to parse sign for transition time \
1185 in POSIX time zone string: {e}",
1186 )
1187 })?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().
1188 .unwrap_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or().(1);
1189 let hour = self.parse_hour_ianav3plusrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_hour_ianav3plus().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1190 (sign, hour)
1191 } else {
1192 (1, i16::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[i16][`From<i8>`]from().(self.parse_hour_posixrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_hour_posix().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().))
1193 };
1194 let (mut minute, mut second) = (0, 0);
1195 if self.maybe_byterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]maybe_byte().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][`PartialEq<Self>`]eq().Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(b':') {
1196 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.bumprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]bump().() {
1197 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1198 "incomplete transition time in \
1199 POSIX time zone string (missing minutes)",
1200 ));
1201 }
1202 minute = self.parse_minuterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_minute().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1203 if self.maybe_byterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]maybe_byte().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][`PartialEq<Self>`]eq().Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(b':') {
1204 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.bumprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]bump().() {
1205 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1206 "incomplete transition time in \
1207 POSIX time zone string (missing seconds)",
1208 ));
1209 }
1210 second = self.parse_secondrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_second().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1211 }
1212 }
1213 let mut time = PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.: i32::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[i32][`From<i16>`]from().(hour) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul().3600 };
1214 time.secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().i32::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[i32][`From<i8>`]from().(minute) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul().60;
1215 time.secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`AddAssign<Self>`]add_assign().i32::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[i32][`From<i8>`]from().(second);
1216 time.secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`MulAssign<Self>`]mul_assign().*=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`MulAssign<Self>`]mul_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`MulAssign<Self>`]mul_assign().i32::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[i32][`From<i8>`]from().(sign);
1217 // Must be true because the parsing routines for hours, minutes
1218 // and seconds enforce they are in the ranges -167..=167, 0..=59
1219 // and 0..=59, respectively.
1220 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(
1221 -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().604799 <= time.secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second. && time.secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second. <= 604799,
1222 "POSIX time seconds {} is out of range",
1223 time.secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.
1224 );
1225 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(time)
1226 }
1227
1228 /// Parses a month.
1229 ///
1230 /// This is expected to be positioned at the first digit. Upon success,
1231 /// the parser will be positioned after the month (which may contain
1232 /// two digits).
1233 fn parse_monthrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_month().(&self) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<i8, Errorrust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error#> {
1234 let number = self.parse_number_with_upto_n_digitsrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_number_with_upto_n_digits().(2)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1235 let number = i8::try_fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[i8][`TryFrom<i32>`]try_from().(number).map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|_| {
1236 errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1237 "month `{number}` in POSIX time zone \
1238 does not fit into 8-bit integer"
1239 )
1240 })?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1241 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().(1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le().number && number rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le().12) {
1242 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1243 "parsed month `{number}`, but month in \
1244 POSIX time zone must be in range 1..=12",
1245 ));
1246 }
1247 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(number)
1248 }
1249
1250 /// Parses a week-of-month number.
1251 ///
1252 /// This is expected to be positioned at the first digit. Upon success,
1253 /// the parser will be positioned after the week digit.
1254 fn parse_weekrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_week().(&self) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<i8, Errorrust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error#> {
1255 let number = self.parse_number_with_exactly_n_digitsrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_number_with_exactly_n_digits().(1)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1256 let number = i8::try_fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[i8][`TryFrom<i32>`]try_from().(number).map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|_| {
1257 errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1258 "week `{number}` in POSIX time zone \
1259 does not fit into 8-bit integer"
1260 )
1261 })?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1262 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().(1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le().number && number rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le().5) {
1263 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1264 "parsed week `{number}`, but week in \
1265 POSIX time zone must be in range 1..=5"
1266 ));
1267 }
1268 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(number)
1269 }
1270
1271 /// Parses a weekday number.
1272 ///
1273 /// This is expected to be positioned at the first digit. Upon success,
1274 /// the parser will be positioned after the week digit.
1275 ///
1276 /// The weekday returned is guaranteed to be in the range `0..=6`, with
1277 /// `0` corresponding to Sunday.
1278 fn parse_weekdayrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_weekday().(&self) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<i8, Errorrust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error#> {
1279 let number = self.parse_number_with_exactly_n_digitsrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_number_with_exactly_n_digits().(1)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1280 let number = i8::try_fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[i8][`TryFrom<i32>`]try_from().(number).map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|_| {
1281 errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1282 "weekday `{number}` in POSIX time zone \
1283 does not fit into 8-bit integer"
1284 )
1285 })?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1286 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().(0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le().number && number rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le().6) {
1287 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1288 "parsed weekday `{number}`, but weekday in \
1289 POSIX time zone must be in range `0..=6` \
1290 (with `0` corresponding to Sunday)",
1291 ));
1292 }
1293 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(number)
1294 }
1295
1296 /// Parses an hour from a POSIX time specification with the IANA
1297 /// v3+ extension. That is, the hour may be in the range `0..=167`.
1298 /// (Callers should parse an optional sign preceding the hour digits
1299 /// when IANA V3+ parsing is enabled.)
1300 ///
1301 /// The hour is allowed to be a single digit (unlike minutes or
1302 /// seconds).
1303 ///
1304 /// This assumes the parser is positioned at the position where the
1305 /// first hour digit should occur. Upon success, the parser will be
1306 /// positioned immediately after the last hour digit.
1307 fn parse_hour_ianav3plusrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_hour_ianav3plus().(&self) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<i16, Errorrust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error#> {
1308 // Callers should only be using this method when IANA v3+ parsing
1309 // is enabled.
1310 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(self.ianav3plusrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#ianav3plus.);
1311 let number = self
1312 .parse_number_with_upto_n_digitsrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_number_with_upto_n_digits().(3)
1313 .map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|e| errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!("invalid hour digits: {e}"))?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1314 let number = i16::try_fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[i16][`TryFrom<i32>`]try_from().(number).map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|_| {
1315 errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1316 "hour `{number}` in POSIX time zone \
1317 does not fit into 16-bit integer"
1318 )
1319 })?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1320 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().(0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i16][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i16][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i16][`PartialOrd<Self>`]le().number && number rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i16][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i16][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i16][`PartialOrd<Self>`]le().167) {
1321 // The error message says -167 but the check above uses 0.
1322 // This is because the caller is responsible for parsing
1323 // the sign.
1324 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1325 "parsed hour `{number}`, but hour in IANA v3+ \
1326 POSIX time zone must be in range `-167..=167`",
1327 ));
1328 }
1329 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(number)
1330 }
1331
1332 /// Parses an hour from a POSIX time specification, with the allowed
1333 /// range being `0..=24`.
1334 ///
1335 /// The hour is allowed to be a single digit (unlike minutes or
1336 /// seconds).
1337 ///
1338 /// This assumes the parser is positioned at the position where the
1339 /// first hour digit should occur. Upon success, the parser will be
1340 /// positioned immediately after the last hour digit.
1341 fn parse_hour_posixrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_hour_posix().(&self) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<i8, Errorrust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error#> {
1342 let number = self
1343 .parse_number_with_upto_n_digitsrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_number_with_upto_n_digits().(2)
1344 .map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|e| errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!("invalid hour digits: {e}"))?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1345 let number = i8::try_fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[i8][`TryFrom<i32>`]try_from().(number).map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|_| {
1346 errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1347 "hour `{number}` in POSIX time zone \
1348 does not fit into 8-bit integer"
1349 )
1350 })?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1351 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().(0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le().number && number rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le().24) {
1352 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1353 "parsed hour `{number}`, but hour in \
1354 POSIX time zone must be in range `0..=24`",
1355 ));
1356 }
1357 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(number)
1358 }
1359
1360 /// Parses a minute from a POSIX time specification.
1361 ///
1362 /// The minute must be exactly two digits.
1363 ///
1364 /// This assumes the parser is positioned at the position where the
1365 /// first minute digit should occur. Upon success, the parser will be
1366 /// positioned immediately after the second minute digit.
1367 fn parse_minuterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_minute().(&self) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<i8, Errorrust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error#> {
1368 let number = self
1369 .parse_number_with_exactly_n_digitsrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_number_with_exactly_n_digits().(2)
1370 .map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|e| errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!("invalid minute digits: {e}"))?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1371 let number = i8::try_fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[i8][`TryFrom<i32>`]try_from().(number).map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|_| {
1372 errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1373 "minute `{number}` in POSIX time zone \
1374 does not fit into 8-bit integer"
1375 )
1376 })?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1377 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().(0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le().number && number rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le().59) {
1378 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1379 "parsed minute `{number}`, but minute in \
1380 POSIX time zone must be in range `0..=59`",
1381 ));
1382 }
1383 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(number)
1384 }
1385
1386 /// Parses a second from a POSIX time specification.
1387 ///
1388 /// The second must be exactly two digits.
1389 ///
1390 /// This assumes the parser is positioned at the position where the
1391 /// first second digit should occur. Upon success, the parser will be
1392 /// positioned immediately after the second second digit.
1393 fn parse_secondrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_second().(&self) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<i8, Errorrust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error#> {
1394 let number = self
1395 .parse_number_with_exactly_n_digitsrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_number_with_exactly_n_digits().(2)
1396 .map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|e| errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!("invalid second digits: {e}"))?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1397 let number = i8::try_fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[i8][`TryFrom<i32>`]try_from().(number).map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|_| {
1398 errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1399 "second `{number}` in POSIX time zone \
1400 does not fit into 8-bit integer"
1401 )
1402 })?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1403 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().(0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le().number && number rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i8][`PartialOrd<Self>`]le().59) {
1404 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1405 "parsed second `{number}`, but second in \
1406 POSIX time zone must be in range `0..=59`",
1407 ));
1408 }
1409 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(number)
1410 }
1411
1412 /// Parses a signed 64-bit integer expressed in exactly `n` digits.
1413 ///
1414 /// If `n` digits could not be found (or if the `TZ` string ends before
1415 /// `n` digits could be found), then this returns an error.
1416 ///
1417 /// This assumes that `n >= 1` and that the parser is positioned at the
1418 /// first digit. Upon success, the parser is positioned immediately
1419 /// after the `n`th digit.
1420 fn parse_number_with_exactly_n_digitsrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_number_with_exactly_n_digits().(
1421 &self,
1422 n: usize,
1423 ) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<i32, Errorrust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error#> {
1424 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(n >= 1, "numbers must have at least 1 digit");
1425 let start = self.posrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]pos().();
1426 let mut number: i32 = 0;
1427 for i in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#n {
1428 if self.is_donerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]is_done().() {
1429 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!("expected {n} digits, but found {i}"));
1430 }
1431 let byte = self.byterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]byte().();
1432 let digit = match byte.checked_subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u8]checked_sub().(b'0') {
1433 Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None# => {
1434 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1435 "invalid digit, expected 0-9 but got {}",
1436 Byterust-analyzer cargo jiff-static 0.2.16 shared/util/escape/Byte#(byte),
1437 ));
1438 }
1439 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(digit) if digit rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u8][`PartialOrd<Self>`]gt().9 => {
1440 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1441 "invalid digit, expected 0-9 but got {}",
1442 Byterust-analyzer cargo jiff-static 0.2.16 shared/util/escape/Byte#(byte),
1443 ))
1444 }
1445 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(digit) => {
1446 debug_assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/debug_assert!!((0..=9).containsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/impl#[`RangeInclusive<Idx>`]contains().(&digit));
1447 i32::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[i32][`From<u8>`]from().(digit)
1448 }
1449 };
1450 number = number
1451 .checked_mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[i32]checked_mul().(10)
1452 .and_thenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]and_then().(|n| n.checked_addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[i32]checked_add().(digit))
1453 .ok_or_elserust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]ok_or_else().(|| {
1454 errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1455 "number `{}` too big to parse into 64-bit integer",
1456 Bytesrust-analyzer cargo jiff-static 0.2.16 shared/util/escape/Bytes#(&self.tzrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#tz.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().start..]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/index/impl#[`[T]`][`Index<I>`]index()...i]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/index/impl#[`[T]`][`Index<I>`]index().),
1457 )
1458 })?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1459 self.bumprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]bump().();
1460 }
1461 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(number)
1462 }
1463
1464 /// Parses a signed 64-bit integer expressed with up to `n` digits and
1465 /// at least 1 digit.
1466 ///
1467 /// This assumes that `n >= 1` and that the parser is positioned at the
1468 /// first digit. Upon success, the parser is position immediately after
1469 /// the last digit (which can be at most `n`).
1470 fn parse_number_with_upto_n_digitsrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_number_with_upto_n_digits().(&self, n: usize) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<i32, Errorrust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error#> {
1471 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(n >= 1, "numbers must have at least 1 digit");
1472 let start = self.posrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]pos().();
1473 let mut number: i32 = 0;
1474 for i in 0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#n {
1475 if self.is_donerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]is_done().() || !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.byterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]byte().().is_ascii_digitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u8]is_ascii_digit().() {
1476 if i rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().0 {
1477 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!("invalid number, no digits found"));
1478 }
1479 break;
1480 }
1481 let digit = i32::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[i32][`From<u8>`]from().(self.byterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]byte().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u8][`Sub<Self>`]sub().b'0');
1482 number = number
1483 .checked_mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[i32]checked_mul().(10)
1484 .and_thenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]and_then().(|n| n.checked_addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[i32]checked_add().(digit))
1485 .ok_or_elserust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]ok_or_else().(|| {
1486 errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1487 "number `{}` too big to parse into 64-bit integer",
1488 Bytesrust-analyzer cargo jiff-static 0.2.16 shared/util/escape/Bytes#(&self.tzrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#tz.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().start..]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/index/impl#[`[T]`][`Index<I>`]index()...i]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/index/impl#[`[T]`][`Index<I>`]index().),
1489 )
1490 })?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1491 self.bumprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]bump().();
1492 }
1493 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(number)
1494 }
1495
1496 /// Parses an optional sign.
1497 ///
1498 /// This assumes the parser is positioned at the position where a
1499 /// positive or negative sign is permitted. If one exists, then it
1500 /// is consumed and returned. Moreover, if one exists, then this
1501 /// guarantees that it is not the last byte in the input. That is, upon
1502 /// success, it is valid to call `self.byte()`.
1503 fn parse_optional_signrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_optional_sign().(&self) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<i8>, Errorrust-analyzer cargo jiff-static 0.2.16 shared/util/error/Error#> {
1504 if self.is_donerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]is_done().() {
1505 return Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#);
1506 }
1507 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(match self.byterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]byte().() {
1508 b'-' => {
1509 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.bumprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]bump().() {
1510 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1511 "expected digit after '-' sign, \
1512 but got end of input",
1513 ));
1514 }
1515 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i8][Neg]neg().1)
1516 }
1517 b'+' => {
1518 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.bumprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]bump().() {
1519 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(errrust-analyzer cargo jiff-static 0.2.16 shared/util/error/err!!(
1520 "expected digit after '+' sign, \
1521 but got end of input",
1522 ));
1523 }
1524 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(1)
1525 }
1526 _ => Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
1527 })
1528 }
1529 }
1530
1531 /// Helper routines for parsing a POSIX `TZ` string.
1532 impl<'s> Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#<'s> {
1533 /// Bump the parser to the next byte.
1534 ///
1535 /// If the end of the input has been reached, then `false` is returned.
1536 fn bumprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]bump().(&self) -> bool {
1537 if self.is_donerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]is_done().() {
1538 return false;
1539 }
1540 self.posrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#pos..setrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cell/impl#[`Cell<T>`]set().(
1541 self.posrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]pos().().checked_addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[usize]checked_add().(1).expectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]expect().("pos cannot overflow usize"),
1542 );
1543 !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.is_donerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]is_done().()
1544 }
1545
1546 /// Returns true if the next call to `bump` would return false.
1547 fn is_donerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]is_done().(&self) -> bool {
1548 self.posrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]pos().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialEq<Self>`]eq().self.tzrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#tz..lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().()
1549 }
1550
1551 /// Return the byte at the current position of the parser.
1552 ///
1553 /// This panics if the parser is positioned at the end of the TZ
1554 /// string.
1555 fn byterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]byte().(&self) -> u8 {
1556 self.tzrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#tz.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().self.posrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]pos().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().
1557 }
1558
1559 /// Return the byte at the current position of the parser. If the TZ
1560 /// string has been exhausted, then this returns `None`.
1561 fn maybe_byterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]maybe_byte().(&self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u8> {
1562 self.tzrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#tz..getrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]get().(self.posrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]pos().()).copiedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<&T>`]copied().()
1563 }
1564
1565 /// Return the current byte offset of the parser.
1566 ///
1567 /// The offset starts at `0` from the beginning of the TZ string.
1568 fn posrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]pos().(&self) -> usize {
1569 self.posrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#pos..getrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cell/impl#[`Cell<T>`]get().()
1570 }
1571
1572 /// Returns the remaining bytes of the TZ string.
1573 ///
1574 /// This includes `self.byte()`. It may be empty.
1575 fn remainingrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]remaining().(&self) -> &'s [u8] {
1576 &self.tzrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#tz.[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().self.posrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]pos().()..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFrom#]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().
1577 }
1578 }
1579
1580 // Tests require parsing, and parsing requires alloc.
1581 #[cfg(test)]
1582 mod testsrust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/ {
1583 use allocrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc crate/::stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/::ToStringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/ToString#;
1584
1585 use superrust-analyzer cargo jiff-static 0.2.16 shared/posix/::*;
1586
1587 fn posix_time_zonerust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/posix_time_zone().(
1588 input: impl AsRefrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/AsRef#<[u8]>,
1589 ) -> PosixTimeZonerust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#<Abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/util/array_str/Abbreviation#> {
1590 let input = input.as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/AsRef#as_ref().();
1591 let tz = PosixTimeZonerust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#::parserust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<super::util::array_str::ArrayStr<ABBREVIATION_MAX>>`]parse().(input).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().();
1592 // While we're here, assert that converting the TZ back
1593 // to a string matches what we got. In the original version
1594 // of the POSIX TZ parser, we were very meticulous about
1595 // capturing the exact AST of the time zone. But I've
1596 // since simplified the data structure considerably such
1597 // that it is lossy in terms of what was actually parsed
1598 // (but of course, not lossy in terms of the semantic
1599 // meaning of the time zone).
1600 //
1601 // So to account for this, we serialize to a string and
1602 // then parse it back. We should get what we started with.
1603 let reparsed =
1604 PosixTimeZonerust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#::parserust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<super::util::array_str::ArrayStr<ABBREVIATION_MAX>>`]parse().(tz.to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().().as_bytesrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]as_bytes().()).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().();
1605 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(tz, reparsed);
1606 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(tz.to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(), reparsed.to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().());
1607 tz
1608 }
1609
1610 fn parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/parser().(s: &str) -> Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#<'_> {
1611 Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().(s.as_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]as_bytes().())
1612 }
1613
1614 fn daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(year: i16, month: i8, day: i8) -> IDaterust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate# {
1615 IDaterust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate# { yearrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate#year., monthrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate#month., dayrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IDate#day. }
1616 }
1617
1618 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
1619 fn parserust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/parse().() {
1620 let p = parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/parser().("NZST-12NZDT,J60,J300");
1621 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
1622 p.parserust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
1623 PosixTimeZonerust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone# {
1624 std_abbrevrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#std_abbrev.: "NZST".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(),
1625 std_offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#std_offset.: PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.: 12 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1626 dstrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#dst.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(PosixDstrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst# {
1627 abbrevrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#abbrev.: "NZDT".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(),
1628 offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#offset.: PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.: 13 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1629 rulerust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#rule.: PosixRulerust-analyzer cargo jiff-static 0.2.16 shared/PosixRule# {
1630 startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start.: PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
1631 daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date.: PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::JulianOnerust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#JulianOne#(60),
1632 timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.: PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.: 2 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1633 },
1634 endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end.: PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
1635 daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date.: PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::JulianOnerust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#JulianOne#(300),
1636 timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.: PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.: 2 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1637 },
1638 },
1639 }),
1640 },
1641 );
1642
1643 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("NZST-12NZDT,J60,J300WAT");
1644 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parserust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
1645 }
1646
1647 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
1648 fn parse_posix_time_zonerust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/parse_posix_time_zone().() {
1649 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("NZST-12NZDT,M9.5.0,M4.1.0/3");
1650 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
1651 p.parse_posix_time_zonerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_time_zone().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
1652 PosixTimeZonerust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone# {
1653 std_abbrevrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#std_abbrev.: "NZST".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(),
1654 std_offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#std_offset.: PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.: 12 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1655 dstrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#dst.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(PosixDstrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst# {
1656 abbrevrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#abbrev.: "NZDT".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(),
1657 offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#offset.: PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.: 13 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1658 rulerust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#rule.: PosixRulerust-analyzer cargo jiff-static 0.2.16 shared/PosixRule# {
1659 startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start.: PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
1660 daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date.: PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::WeekdayOfMonthrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth# {
1661 monthrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#month.: 9,
1662 weekrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#week.: 5,
1663 weekdayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#weekday.: 0,
1664 },
1665 timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.: PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.: 2 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1666 },
1667 endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end.: PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
1668 daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date.: PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::WeekdayOfMonthrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth# {
1669 monthrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#month.: 4,
1670 weekrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#week.: 1,
1671 weekdayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#weekday.: 0,
1672 },
1673 timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.: PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.: 3 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1674 },
1675 },
1676 }),
1677 },
1678 );
1679
1680 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("NZST-12NZDT,M9.5.0,M4.1.0/3WAT");
1681 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
1682 p.parse_posix_time_zonerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_time_zone().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
1683 PosixTimeZonerust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone# {
1684 std_abbrevrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#std_abbrev.: "NZST".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(),
1685 std_offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#std_offset.: PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.: 12 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1686 dstrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#dst.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(PosixDstrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst# {
1687 abbrevrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#abbrev.: "NZDT".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(),
1688 offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#offset.: PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.: 13 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1689 rulerust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#rule.: PosixRulerust-analyzer cargo jiff-static 0.2.16 shared/PosixRule# {
1690 startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start.: PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
1691 daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date.: PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::WeekdayOfMonthrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth# {
1692 monthrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#month.: 9,
1693 weekrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#week.: 5,
1694 weekdayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#weekday.: 0,
1695 },
1696 timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.: PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.: 2 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1697 },
1698 endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end.: PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
1699 daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date.: PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::WeekdayOfMonthrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth# {
1700 monthrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#month.: 4,
1701 weekrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#week.: 1,
1702 weekdayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#weekday.: 0,
1703 },
1704 timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.: PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.: 3 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1705 },
1706 },
1707 }),
1708 },
1709 );
1710
1711 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("NZST-12NZDT,J60,J300");
1712 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
1713 p.parse_posix_time_zonerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_time_zone().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
1714 PosixTimeZonerust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone# {
1715 std_abbrevrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#std_abbrev.: "NZST".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(),
1716 std_offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#std_offset.: PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.: 12 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1717 dstrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#dst.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(PosixDstrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst# {
1718 abbrevrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#abbrev.: "NZDT".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(),
1719 offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#offset.: PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.: 13 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1720 rulerust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#rule.: PosixRulerust-analyzer cargo jiff-static 0.2.16 shared/PosixRule# {
1721 startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start.: PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
1722 daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date.: PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::JulianOnerust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#JulianOne#(60),
1723 timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.: PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.: 2 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1724 },
1725 endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end.: PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
1726 daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date.: PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::JulianOnerust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#JulianOne#(300),
1727 timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.: PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.: 2 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1728 },
1729 },
1730 }),
1731 },
1732 );
1733
1734 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("NZST-12NZDT,J60,J300WAT");
1735 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
1736 p.parse_posix_time_zonerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_time_zone().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
1737 PosixTimeZonerust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone# {
1738 std_abbrevrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#std_abbrev.: "NZST".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(),
1739 std_offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#std_offset.: PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.: 12 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1740 dstrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#dst.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(PosixDstrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst# {
1741 abbrevrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#abbrev.: "NZDT".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(),
1742 offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#offset.: PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.: 13 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1743 rulerust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#rule.: PosixRulerust-analyzer cargo jiff-static 0.2.16 shared/PosixRule# {
1744 startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start.: PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
1745 daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date.: PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::JulianOnerust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#JulianOne#(60),
1746 timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.: PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.: 2 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1747 },
1748 endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end.: PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
1749 daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date.: PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::JulianOnerust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#JulianOne#(300),
1750 timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.: PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.: 2 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1751 },
1752 },
1753 }),
1754 },
1755 );
1756 }
1757
1758 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
1759 fn parse_posix_dstrust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/parse_posix_dst().() {
1760 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("NZDT,M9.5.0,M4.1.0/3");
1761 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
1762 p.parse_posix_dstrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_dst().(&PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.: 12 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 }).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
1763 PosixDstrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst# {
1764 abbrevrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#abbrev.: "NZDT".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(),
1765 offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#offset.: PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.: 13 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1766 rulerust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#rule.: PosixRulerust-analyzer cargo jiff-static 0.2.16 shared/PosixRule# {
1767 startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start.: PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
1768 daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date.: PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::WeekdayOfMonthrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth# {
1769 monthrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#month.: 9,
1770 weekrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#week.: 5,
1771 weekdayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#weekday.: 0,
1772 },
1773 timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.: PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.: 2 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1774 },
1775 endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end.: PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
1776 daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date.: PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::WeekdayOfMonthrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth# {
1777 monthrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#month.: 4,
1778 weekrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#week.: 1,
1779 weekdayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#weekday.: 0,
1780 },
1781 timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.: PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.: 3 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1782 },
1783 },
1784 },
1785 );
1786
1787 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("NZDT,J60,J300");
1788 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
1789 p.parse_posix_dstrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_dst().(&PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.: 12 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 }).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
1790 PosixDstrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst# {
1791 abbrevrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#abbrev.: "NZDT".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(),
1792 offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#offset.: PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.: 13 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1793 rulerust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#rule.: PosixRulerust-analyzer cargo jiff-static 0.2.16 shared/PosixRule# {
1794 startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start.: PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
1795 daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date.: PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::JulianOnerust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#JulianOne#(60),
1796 timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.: PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.: 2 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1797 },
1798 endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end.: PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
1799 daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date.: PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::JulianOnerust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#JulianOne#(300),
1800 timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.: PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.: 2 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1801 },
1802 },
1803 },
1804 );
1805
1806 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("NZDT-7,J60,J300");
1807 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
1808 p.parse_posix_dstrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_dst().(&PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.: 12 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 }).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
1809 PosixDstrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst# {
1810 abbrevrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#abbrev.: "NZDT".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(),
1811 offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#offset.: PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.: 7 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1812 rulerust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#rule.: PosixRulerust-analyzer cargo jiff-static 0.2.16 shared/PosixRule# {
1813 startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start.: PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
1814 daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date.: PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::JulianOnerust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#JulianOne#(60),
1815 timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.: PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.: 2 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1816 },
1817 endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end.: PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
1818 daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date.: PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::JulianOnerust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#JulianOne#(300),
1819 timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.: PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.: 2 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1820 },
1821 },
1822 },
1823 );
1824
1825 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("NZDT+7,J60,J300");
1826 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
1827 p.parse_posix_dstrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_dst().(&PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.: 12 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 }).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
1828 PosixDstrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst# {
1829 abbrevrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#abbrev.: "NZDT".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(),
1830 offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#offset.: PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.: -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().7 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1831 rulerust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#rule.: PosixRulerust-analyzer cargo jiff-static 0.2.16 shared/PosixRule# {
1832 startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start.: PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
1833 daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date.: PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::JulianOnerust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#JulianOne#(60),
1834 timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.: PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.: 2 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1835 },
1836 endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end.: PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
1837 daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date.: PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::JulianOnerust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#JulianOne#(300),
1838 timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.: PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.: 2 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1839 },
1840 },
1841 },
1842 );
1843
1844 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("NZDT7,J60,J300");
1845 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
1846 p.parse_posix_dstrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_dst().(&PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.: 12 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 }).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
1847 PosixDstrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst# {
1848 abbrevrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#abbrev.: "NZDT".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(),
1849 offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#offset.: PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.: -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().7 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1850 rulerust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#rule.: PosixRulerust-analyzer cargo jiff-static 0.2.16 shared/PosixRule# {
1851 startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start.: PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
1852 daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date.: PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::JulianOnerust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#JulianOne#(60),
1853 timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.: PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.: 2 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1854 },
1855 endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end.: PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
1856 daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date.: PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::JulianOnerust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#JulianOne#(300),
1857 timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.: PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.: 2 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
1858 },
1859 },
1860 },
1861 );
1862
1863 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("NZDT7,");
1864 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p
1865 .parse_posix_dstrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_dst().(&PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.: 12 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 })
1866 .is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
1867
1868 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("NZDT7!");
1869 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p
1870 .parse_posix_dstrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_dst().(&PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.: 12 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 })
1871 .is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
1872 }
1873
1874 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
1875 fn parse_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/parse_abbreviation().() {
1876 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("ABC");
1877 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_abbreviation().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), "ABC");
1878
1879 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("<ABC>");
1880 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_abbreviation().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), "ABC");
1881
1882 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("<+09>");
1883 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_abbreviation().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), "+09");
1884
1885 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("+09");
1886 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_abbreviation().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
1887 }
1888
1889 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
1890 fn parse_unquoted_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/parse_unquoted_abbreviation().() {
1891 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("ABC");
1892 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_unquoted_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_unquoted_abbreviation().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), "ABC");
1893
1894 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("ABCXYZ");
1895 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_unquoted_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_unquoted_abbreviation().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), "ABCXYZ");
1896
1897 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("ABC123");
1898 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_unquoted_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_unquoted_abbreviation().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), "ABC");
1899
1900 let tz = "a".repeatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str]repeat().(30);
1901 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().(&tz);
1902 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_unquoted_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_unquoted_abbreviation().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), &*rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][Deref]deref().tz);
1903
1904 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("a");
1905 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_unquoted_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_unquoted_abbreviation().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
1906
1907 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("ab");
1908 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_unquoted_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_unquoted_abbreviation().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
1909
1910 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("ab1");
1911 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_unquoted_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_unquoted_abbreviation().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
1912
1913 let tz = "a".repeatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str]repeat().(31);
1914 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().(&tz);
1915 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_unquoted_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_unquoted_abbreviation().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
1916
1917 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().(b"ab\xFFcd");
1918 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_unquoted_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_unquoted_abbreviation().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
1919 }
1920
1921 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
1922 fn parse_quoted_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/parse_quoted_abbreviation().() {
1923 // The inputs look a little funny here, but that's because
1924 // 'parse_quoted_abbreviation' starts after the opening quote
1925 // has been parsed.
1926
1927 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("ABC>");
1928 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_quoted_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_quoted_abbreviation().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), "ABC");
1929
1930 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("ABCXYZ>");
1931 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_quoted_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_quoted_abbreviation().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), "ABCXYZ");
1932
1933 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("ABC>123");
1934 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_quoted_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_quoted_abbreviation().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), "ABC");
1935
1936 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("ABC123>");
1937 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_quoted_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_quoted_abbreviation().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), "ABC123");
1938
1939 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("ab1>");
1940 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_quoted_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_quoted_abbreviation().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), "ab1");
1941
1942 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("+09>");
1943 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_quoted_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_quoted_abbreviation().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), "+09");
1944
1945 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("-09>");
1946 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_quoted_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_quoted_abbreviation().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), "-09");
1947
1948 let tz = allocrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc crate/::formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!("{}>", "a".repeatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str]repeat().(30));
1949 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().(&tz);
1950 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
1951 p.parse_quoted_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_quoted_abbreviation().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
1952 tz.trim_end_matchesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]trim_end_matches().(">")
1953 );
1954
1955 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("a>");
1956 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_quoted_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_quoted_abbreviation().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
1957
1958 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("ab>");
1959 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_quoted_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_quoted_abbreviation().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
1960
1961 let tz = allocrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc crate/::formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!("{}>", "a".repeatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str]repeat().(31));
1962 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().(&tz);
1963 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_quoted_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_quoted_abbreviation().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
1964
1965 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().(b"ab\xFFcd>");
1966 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_quoted_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_quoted_abbreviation().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
1967
1968 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("ABC");
1969 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_quoted_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_quoted_abbreviation().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
1970
1971 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("ABC!>");
1972 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_quoted_abbreviationrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_quoted_abbreviation().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
1973 }
1974
1975 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
1976 fn parse_posix_offsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/parse_posix_offset().() {
1977 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("5");
1978 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_posix_offsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_offset().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().().secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second., -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().5 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60);
1979
1980 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("+5");
1981 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_posix_offsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_offset().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().().secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second., -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().5 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60);
1982
1983 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("-5");
1984 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_posix_offsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_offset().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().().secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second., 5 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60);
1985
1986 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("-12:34:56");
1987 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
1988 p.parse_posix_offsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_offset().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().().secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.,
1989 12 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). 34 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). 56,
1990 );
1991
1992 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("a");
1993 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_posix_offsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_offset().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
1994
1995 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("-");
1996 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_posix_offsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_offset().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
1997
1998 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("+");
1999 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_posix_offsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_offset().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2000
2001 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("-a");
2002 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_posix_offsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_offset().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2003
2004 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("+a");
2005 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_posix_offsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_offset().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2006
2007 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("-25");
2008 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_posix_offsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_offset().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2009
2010 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("+25");
2011 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_posix_offsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_offset().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2012
2013 // This checks that we don't accidentally permit IANA rules for
2014 // offset parsing. Namely, the IANA tzfile v3+ extension only applies
2015 // to transition times. But since POSIX says that the "time" for the
2016 // offset and transition is the same format, it would be an easy
2017 // implementation mistake to implement the more flexible rule for
2018 // IANA and have it accidentally also apply to the offset. So we check
2019 // that it doesn't here.
2020 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser# { ianav3plusrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#ianav3plus.: true, ..Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("25") };
2021 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_posix_offsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_offset().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2022 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser# { ianav3plusrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#ianav3plus.: true, ..Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("+25") };
2023 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_posix_offsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_offset().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2024 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser# { ianav3plusrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#ianav3plus.: true, ..Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("-25") };
2025 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_posix_offsetrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_offset().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2026 }
2027
2028 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
2029 fn parse_rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/parse_rule().() {
2030 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("M9.5.0,M4.1.0/3");
2031 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2032 p.parse_rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_rule().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
2033 PosixRulerust-analyzer cargo jiff-static 0.2.16 shared/PosixRule# {
2034 startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start.: PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
2035 daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date.: PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::WeekdayOfMonthrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth# {
2036 monthrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#month.: 9,
2037 weekrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#week.: 5,
2038 weekdayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#weekday.: 0,
2039 },
2040 timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.: PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.: 2 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
2041 },
2042 endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end.: PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
2043 daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date.: PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::WeekdayOfMonthrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth# {
2044 monthrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#month.: 4,
2045 weekrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#week.: 1,
2046 weekdayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#weekday.: 0,
2047 },
2048 timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.: PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.: 3 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
2049 },
2050 },
2051 );
2052
2053 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("M9.5.0");
2054 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_rule().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2055
2056 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().(",M9.5.0,M4.1.0/3");
2057 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_rule().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2058
2059 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("M9.5.0/");
2060 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_rule().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2061
2062 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("M9.5.0,M4.1.0/");
2063 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_rule().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2064 }
2065
2066 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
2067 fn parse_posix_datetimerust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/parse_posix_datetime().() {
2068 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("J1");
2069 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2070 p.parse_posix_datetimerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_datetime().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
2071 PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
2072 daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date.: PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::JulianOnerust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#JulianOne#(1),
2073 timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.: PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.: 2 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 }
2074 },
2075 );
2076
2077 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("J1/3");
2078 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2079 p.parse_posix_datetimerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_datetime().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
2080 PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
2081 daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date.: PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::JulianOnerust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#JulianOne#(1),
2082 timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.: PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.: 3 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 }
2083 },
2084 );
2085
2086 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("M4.1.0/3");
2087 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2088 p.parse_posix_datetimerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_datetime().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
2089 PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
2090 daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date.: PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::WeekdayOfMonthrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth# {
2091 monthrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#month.: 4,
2092 weekrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#week.: 1,
2093 weekdayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#weekday.: 0,
2094 },
2095 timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.: PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.: 3 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
2096 },
2097 );
2098
2099 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("1/3:45:05");
2100 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2101 p.parse_posix_datetimerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_datetime().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
2102 PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
2103 daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date.: PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::JulianZerorust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#JulianZero#(1),
2104 timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.: PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.: 3 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). 45 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). 5 },
2105 },
2106 );
2107
2108 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("a");
2109 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_posix_datetimerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_datetime().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2110
2111 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("J1/");
2112 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_posix_datetimerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_datetime().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2113
2114 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("1/");
2115 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_posix_datetimerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_datetime().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2116
2117 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("M4.1.0/");
2118 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_posix_datetimerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_datetime().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2119 }
2120
2121 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
2122 fn parse_posix_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/parse_posix_date().() {
2123 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("J1");
2124 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_posix_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_date().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::JulianOnerust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#JulianOne#(1));
2125 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("J365");
2126 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_posix_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_date().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::JulianOnerust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#JulianOne#(365));
2127
2128 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("0");
2129 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_posix_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_date().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::JulianZerorust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#JulianZero#(0));
2130 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("1");
2131 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_posix_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_date().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::JulianZerorust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#JulianZero#(1));
2132 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("365");
2133 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_posix_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_date().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::JulianZerorust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#JulianZero#(365));
2134
2135 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("M9.5.0");
2136 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2137 p.parse_posix_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_date().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
2138 PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::WeekdayOfMonthrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth# { monthrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#month.: 9, weekrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#week.: 5, weekdayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#weekday.: 0 },
2139 );
2140 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("M9.5.6");
2141 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2142 p.parse_posix_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_date().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
2143 PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::WeekdayOfMonthrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth# { monthrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#month.: 9, weekrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#week.: 5, weekdayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#weekday.: 6 },
2144 );
2145 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("M09.5.6");
2146 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2147 p.parse_posix_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_date().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
2148 PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::WeekdayOfMonthrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth# { monthrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#month.: 9, weekrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#week.: 5, weekdayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#weekday.: 6 },
2149 );
2150 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("M12.1.1");
2151 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2152 p.parse_posix_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_date().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
2153 PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::WeekdayOfMonthrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth# { monthrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#month.: 12, weekrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#week.: 1, weekdayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#weekday.: 1 },
2154 );
2155
2156 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("a");
2157 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_posix_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_date().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2158
2159 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("j");
2160 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_posix_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_date().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2161
2162 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("m");
2163 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_posix_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_date().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2164
2165 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("n");
2166 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_posix_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_date().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2167
2168 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("J366");
2169 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_posix_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_date().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2170
2171 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("366");
2172 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_posix_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_date().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2173 }
2174
2175 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
2176 fn parse_posix_julian_day_no_leaprust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/parse_posix_julian_day_no_leap().() {
2177 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("1");
2178 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_posix_julian_day_no_leaprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_julian_day_no_leap().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 1);
2179
2180 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("001");
2181 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_posix_julian_day_no_leaprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_julian_day_no_leap().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 1);
2182
2183 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("365");
2184 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_posix_julian_day_no_leaprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_julian_day_no_leap().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 365);
2185
2186 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("3655");
2187 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_posix_julian_day_no_leaprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_julian_day_no_leap().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 365);
2188
2189 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("0");
2190 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_posix_julian_day_no_leaprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_julian_day_no_leap().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2191
2192 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("366");
2193 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_posix_julian_day_no_leaprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_julian_day_no_leap().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2194 }
2195
2196 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
2197 fn parse_posix_julian_day_with_leaprust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/parse_posix_julian_day_with_leap().() {
2198 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("0");
2199 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_posix_julian_day_with_leaprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_julian_day_with_leap().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 0);
2200
2201 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("1");
2202 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_posix_julian_day_with_leaprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_julian_day_with_leap().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 1);
2203
2204 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("001");
2205 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_posix_julian_day_with_leaprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_julian_day_with_leap().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 1);
2206
2207 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("365");
2208 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_posix_julian_day_with_leaprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_julian_day_with_leap().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 365);
2209
2210 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("3655");
2211 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_posix_julian_day_with_leaprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_julian_day_with_leap().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 365);
2212
2213 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("366");
2214 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_posix_julian_day_with_leaprust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_julian_day_with_leap().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2215 }
2216
2217 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
2218 fn parse_weekday_of_monthrust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/parse_weekday_of_month().() {
2219 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("9.5.0");
2220 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_weekday_of_monthrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_weekday_of_month().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), (9, 5, 0));
2221
2222 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("9.1.6");
2223 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_weekday_of_monthrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_weekday_of_month().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), (9, 1, 6));
2224
2225 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("09.1.6");
2226 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_weekday_of_monthrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_weekday_of_month().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), (9, 1, 6));
2227
2228 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("9");
2229 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_weekday_of_monthrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_weekday_of_month().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2230
2231 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("9.");
2232 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_weekday_of_monthrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_weekday_of_month().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2233
2234 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("9.5");
2235 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_weekday_of_monthrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_weekday_of_month().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2236
2237 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("9.5.");
2238 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_weekday_of_monthrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_weekday_of_month().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2239
2240 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("0.5.0");
2241 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_weekday_of_monthrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_weekday_of_month().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2242
2243 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("13.5.0");
2244 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_weekday_of_monthrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_weekday_of_month().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2245
2246 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("9.0.0");
2247 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_weekday_of_monthrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_weekday_of_month().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2248
2249 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("9.6.0");
2250 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_weekday_of_monthrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_weekday_of_month().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2251
2252 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("9.5.7");
2253 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_weekday_of_monthrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_weekday_of_month().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2254 }
2255
2256 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
2257 fn parse_posix_timerust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/parse_posix_time().() {
2258 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("5");
2259 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_posix_timerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_time().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().().secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second., 5 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60);
2260
2261 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("22");
2262 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_posix_timerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_time().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().().secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second., 22 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60);
2263
2264 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("02");
2265 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_posix_timerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_time().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().().secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second., 2 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60);
2266
2267 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("5:45");
2268 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2269 p.parse_posix_timerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_time().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().().secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.,
2270 5 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). 45 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60
2271 );
2272
2273 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("5:45:12");
2274 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2275 p.parse_posix_timerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_time().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().().secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.,
2276 5 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). 45 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). 12
2277 );
2278
2279 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("5:45:129");
2280 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2281 p.parse_posix_timerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_time().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().().secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.,
2282 5 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). 45 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). 12
2283 );
2284
2285 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("5:45:12:");
2286 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2287 p.parse_posix_timerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_time().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().().secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.,
2288 5 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). 45 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). 12
2289 );
2290
2291 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser# { ianav3plusrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#ianav3plus.: true, ..Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("+5:45:12") };
2292 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2293 p.parse_posix_timerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_time().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().().secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.,
2294 5 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). 45 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). 12
2295 );
2296
2297 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser# { ianav3plusrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#ianav3plus.: true, ..Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("-5:45:12") };
2298 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2299 p.parse_posix_timerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_time().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().().secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.,
2300 -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().(5 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). 45 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). 12)
2301 );
2302
2303 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser# { ianav3plusrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#ianav3plus.: true, ..Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("-167:45:12") };
2304 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2305 p.parse_posix_timerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_time().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().().secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.,
2306 -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().(167 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). 45 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). 12),
2307 );
2308
2309 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("25");
2310 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_posix_timerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_time().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2311
2312 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("12:2");
2313 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_posix_timerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_time().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2314
2315 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("12:");
2316 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_posix_timerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_time().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2317
2318 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("12:23:5");
2319 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_posix_timerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_time().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2320
2321 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("12:23:");
2322 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_posix_timerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_time().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2323
2324 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser# { ianav3plusrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#ianav3plus.: true, ..Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("168") };
2325 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_posix_timerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_time().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2326
2327 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser# { ianav3plusrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#ianav3plus.: true, ..Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("-168") };
2328 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_posix_timerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_time().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2329
2330 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser# { ianav3plusrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#ianav3plus.: true, ..Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("+168") };
2331 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_posix_timerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_posix_time().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2332 }
2333
2334 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
2335 fn parse_monthrust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/parse_month().() {
2336 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("1");
2337 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_monthrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_month().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 1);
2338
2339 // Should this be allowed? POSIX spec is unclear.
2340 // We allow it because our parse does stop at 2
2341 // digits, so this seems harmless. Namely, '001'
2342 // results in an error.
2343 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("01");
2344 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_monthrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_month().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 1);
2345
2346 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("12");
2347 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_monthrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_month().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 12);
2348
2349 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("0");
2350 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_monthrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_month().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2351
2352 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("00");
2353 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_monthrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_month().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2354
2355 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("001");
2356 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_monthrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_month().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2357
2358 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("13");
2359 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_monthrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_month().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2360 }
2361
2362 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
2363 fn parse_weekrust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/parse_week().() {
2364 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("1");
2365 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_weekrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_week().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 1);
2366
2367 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("5");
2368 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_weekrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_week().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 5);
2369
2370 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("55");
2371 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_weekrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_week().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 5);
2372
2373 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("0");
2374 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_weekrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_week().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2375
2376 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("6");
2377 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_weekrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_week().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2378
2379 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("00");
2380 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_weekrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_week().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2381
2382 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("01");
2383 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_weekrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_week().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2384
2385 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("05");
2386 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_weekrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_week().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2387 }
2388
2389 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
2390 fn parse_weekdayrust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/parse_weekday().() {
2391 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("0");
2392 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_weekdayrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_weekday().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 0);
2393
2394 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("1");
2395 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_weekdayrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_weekday().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 1);
2396
2397 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("6");
2398 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_weekdayrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_weekday().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 6);
2399
2400 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("00");
2401 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_weekdayrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_weekday().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 0);
2402
2403 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("06");
2404 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_weekdayrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_weekday().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 0);
2405
2406 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("60");
2407 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_weekdayrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_weekday().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 6);
2408
2409 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("7");
2410 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_weekdayrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_weekday().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2411 }
2412
2413 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
2414 fn parse_hour_posixrust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/parse_hour_posix().() {
2415 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("5");
2416 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_hour_posixrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_hour_posix().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 5);
2417
2418 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("0");
2419 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_hour_posixrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_hour_posix().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 0);
2420
2421 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("00");
2422 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_hour_posixrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_hour_posix().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 0);
2423
2424 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("24");
2425 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_hour_posixrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_hour_posix().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 24);
2426
2427 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("100");
2428 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_hour_posixrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_hour_posix().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 10);
2429
2430 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("25");
2431 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_hour_posixrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_hour_posix().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2432
2433 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("99");
2434 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_hour_posixrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_hour_posix().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2435 }
2436
2437 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
2438 fn parse_hour_ianav3plusrust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/parse_hour_ianav3plus().() {
2439 let new = |input| Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser# { ianav3plusrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#ianav3plus.: true, ..Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().(input) };
2440
2441 let p = new("5");
2442 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_hour_ianav3plusrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_hour_ianav3plus().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 5);
2443
2444 let p = new("0");
2445 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_hour_ianav3plusrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_hour_ianav3plus().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 0);
2446
2447 let p = new("00");
2448 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_hour_ianav3plusrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_hour_ianav3plus().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 0);
2449
2450 let p = new("000");
2451 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_hour_ianav3plusrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_hour_ianav3plus().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 0);
2452
2453 let p = new("24");
2454 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_hour_ianav3plusrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_hour_ianav3plus().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 24);
2455
2456 let p = new("100");
2457 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_hour_ianav3plusrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_hour_ianav3plus().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 100);
2458
2459 let p = new("1000");
2460 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_hour_ianav3plusrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_hour_ianav3plus().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 100);
2461
2462 let p = new("167");
2463 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_hour_ianav3plusrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_hour_ianav3plus().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 167);
2464
2465 let p = new("168");
2466 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_hour_ianav3plusrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_hour_ianav3plus().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2467
2468 let p = new("999");
2469 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_hour_ianav3plusrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_hour_ianav3plus().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2470 }
2471
2472 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
2473 fn parse_minuterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/parse_minute().() {
2474 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("00");
2475 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_minuterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_minute().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 0);
2476
2477 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("24");
2478 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_minuterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_minute().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 24);
2479
2480 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("59");
2481 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_minuterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_minute().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 59);
2482
2483 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("599");
2484 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_minuterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_minute().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 59);
2485
2486 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("0");
2487 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_minuterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_minute().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2488
2489 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("1");
2490 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_minuterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_minute().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2491
2492 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("9");
2493 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_minuterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_minute().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2494
2495 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("60");
2496 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_minuterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_minute().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2497 }
2498
2499 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
2500 fn parse_secondrust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/parse_second().() {
2501 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("00");
2502 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_secondrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_second().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 0);
2503
2504 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("24");
2505 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_secondrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_second().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 24);
2506
2507 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("59");
2508 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_secondrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_second().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 59);
2509
2510 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("599");
2511 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_secondrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_second().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 59);
2512
2513 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("0");
2514 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_secondrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_second().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2515
2516 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("1");
2517 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_secondrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_second().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2518
2519 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("9");
2520 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_secondrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_second().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2521
2522 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("60");
2523 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_secondrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_second().().is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2524 }
2525
2526 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
2527 fn parse_number_with_exactly_n_digitsrust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/parse_number_with_exactly_n_digits().() {
2528 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("1");
2529 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_number_with_exactly_n_digitsrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_number_with_exactly_n_digits().(1).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 1);
2530
2531 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("12");
2532 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_number_with_exactly_n_digitsrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_number_with_exactly_n_digits().(2).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 12);
2533
2534 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("123");
2535 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_number_with_exactly_n_digitsrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_number_with_exactly_n_digits().(2).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 12);
2536
2537 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("");
2538 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_number_with_exactly_n_digitsrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_number_with_exactly_n_digits().(1).is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2539
2540 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("1");
2541 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_number_with_exactly_n_digitsrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_number_with_exactly_n_digits().(2).is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2542
2543 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("12");
2544 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_number_with_exactly_n_digitsrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_number_with_exactly_n_digits().(3).is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2545 }
2546
2547 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
2548 fn parse_number_with_upto_n_digitsrust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/parse_number_with_upto_n_digits().() {
2549 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("1");
2550 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_number_with_upto_n_digitsrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_number_with_upto_n_digits().(1).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 1);
2551
2552 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("1");
2553 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_number_with_upto_n_digitsrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_number_with_upto_n_digits().(2).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 1);
2554
2555 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("12");
2556 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_number_with_upto_n_digitsrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_number_with_upto_n_digits().(2).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 12);
2557
2558 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("12");
2559 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_number_with_upto_n_digitsrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_number_with_upto_n_digits().(3).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 12);
2560
2561 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("123");
2562 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(p.parse_number_with_upto_n_digitsrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_number_with_upto_n_digits().(2).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), 12);
2563
2564 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("");
2565 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_number_with_upto_n_digitsrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_number_with_upto_n_digits().(1).is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2566
2567 let p = Parserrust-analyzer cargo jiff-static 0.2.16 shared/posix/Parser#::newrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]new().("a");
2568 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(p.parse_number_with_upto_n_digitsrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`Parser<'s>`]parse_number_with_upto_n_digits().(1).is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2569 }
2570
2571 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
2572 fn to_dst_civil_datetime_utc_rangerust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/to_dst_civil_datetime_utc_range().() {
2573 let tz = posix_time_zonerust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/posix_time_zone().("WART4WARST,J1/-3,J365/20");
2574 let dst_info = DstInforust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo# {
2575 // We test this in other places. It's too annoying to write this
2576 // out here, and I didn't adopt snapshot testing until I had
2577 // written out these tests by hand. ¯\_(ツ)_/¯
2578 dstrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#dst.: tz.dstrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#dst..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().(),
2579 startrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#start.: daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2024, 1, 1).atrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDate]at().(1, 0, 0, 0),
2580 endrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#end.: daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2024, 12, 31).atrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDate]at().(23, 0, 0, 0),
2581 };
2582 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(tz.dst_info_utcrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]dst_info_utc().(2024), Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(dst_info));
2583
2584 let tz = posix_time_zonerust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/posix_time_zone().("WART4WARST,J1/-4,J365/21");
2585 let dst_info = DstInforust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo# {
2586 dstrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#dst.: tz.dstrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#dst..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().(),
2587 startrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#start.: daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2024, 1, 1).atrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDate]at().(0, 0, 0, 0),
2588 endrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#end.: daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2024, 12, 31).atrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDate]at().(23, 59, 59, 999_999_999),
2589 };
2590 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(tz.dst_info_utcrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]dst_info_utc().(2024), Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(dst_info));
2591
2592 let tz = posix_time_zonerust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/posix_time_zone().("EST5EDT,M3.2.0,M11.1.0");
2593 let dst_info = DstInforust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo# {
2594 dstrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#dst.: tz.dstrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#dst..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().(),
2595 startrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#start.: daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2024, 3, 10).atrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDate]at().(7, 0, 0, 0),
2596 endrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#end.: daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2024, 11, 3).atrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDate]at().(6, 0, 0, 0),
2597 };
2598 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(tz.dst_info_utcrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]dst_info_utc().(2024), Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(dst_info));
2599 }
2600
2601 // See: https://github.com/BurntSushi/jiff/issues/386
2602 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
2603 fn regression_permanent_dstrust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/regression_permanent_dst().() {
2604 let tz = posix_time_zonerust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/posix_time_zone().("XXX-2<+01>-1,0/0,J365/23");
2605 let dst_info = DstInforust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo# {
2606 dstrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#dst.: tz.dstrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#dst..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().(),
2607 startrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#start.: daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2087, 1, 1).atrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDate]at().(0, 0, 0, 0),
2608 endrust-analyzer cargo jiff-static 0.2.16 shared/posix/DstInfo#end.: daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2087, 12, 31).atrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDate]at().(23, 59, 59, 999_999_999),
2609 };
2610 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(tz.dst_info_utcrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]dst_info_utc().(2087), Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(dst_info));
2611 }
2612
2613 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
2614 fn reasonablerust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/reasonable().() {
2615 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(PosixTimeZonerust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#::parserust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<super::util::array_str::ArrayStr<ABBREVIATION_MAX>>`]parse().(b"EST5").is_okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_ok().());
2616 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(PosixTimeZonerust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#::parserust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<super::util::array_str::ArrayStr<ABBREVIATION_MAX>>`]parse().(b"EST5EDT").is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2617 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(PosixTimeZonerust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#::parserust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<super::util::array_str::ArrayStr<ABBREVIATION_MAX>>`]parse().(b"EST5EDT,J1,J365").is_okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_ok().());
2618
2619 let tz = posix_time_zonerust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/posix_time_zone().("EST24EDT,J1,J365");
2620 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2621 tz,
2622 PosixTimeZonerust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone# {
2623 std_abbrevrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#std_abbrev.: "EST".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(),
2624 std_offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#std_offset.: PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.: -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().24 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
2625 dstrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#dst.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(PosixDstrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst# {
2626 abbrevrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#abbrev.: "EDT".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(),
2627 offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#offset.: PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.: -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().23 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
2628 rulerust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#rule.: PosixRulerust-analyzer cargo jiff-static 0.2.16 shared/PosixRule# {
2629 startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start.: PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
2630 daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date.: PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::JulianOnerust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#JulianOne#(1),
2631 timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.: PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#::DEFAULTrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixTime]DEFAULT.,
2632 },
2633 endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end.: PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
2634 daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date.: PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::JulianOnerust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#JulianOne#(365),
2635 timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.: PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#::DEFAULTrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixTime]DEFAULT.,
2636 },
2637 },
2638 }),
2639 },
2640 );
2641
2642 let tz = posix_time_zonerust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/posix_time_zone().("EST-24EDT,J1,J365");
2643 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2644 tz,
2645 PosixTimeZonerust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone# {
2646 std_abbrevrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#std_abbrev.: "EST".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(),
2647 std_offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#std_offset.: PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.: 24 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
2648 dstrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#dst.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(PosixDstrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst# {
2649 abbrevrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#abbrev.: "EDT".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(),
2650 offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#offset.: PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.: 25 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
2651 rulerust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#rule.: PosixRulerust-analyzer cargo jiff-static 0.2.16 shared/PosixRule# {
2652 startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start.: PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
2653 daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date.: PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::JulianOnerust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#JulianOne#(1),
2654 timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.: PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#::DEFAULTrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixTime]DEFAULT.,
2655 },
2656 endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end.: PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
2657 daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date.: PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::JulianOnerust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#JulianOne#(365),
2658 timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.: PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#::DEFAULTrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixTime]DEFAULT.,
2659 },
2660 },
2661 }),
2662 },
2663 );
2664 }
2665
2666 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
2667 fn posix_date_time_spec_to_datetimerust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/posix_date_time_spec_to_datetime().() {
2668 // For this test, we just keep the offset to zero to simplify things
2669 // a bit. We get coverage for non-zero offsets in higher level tests.
2670 let to_datetime = |daytime: &PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#, year: i16| {
2671 daytime.to_datetimerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixDayTime]to_datetime().(year, IOffsetrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/IOffset#::UTCrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IOffset]UTC.)
2672 };
2673
2674 let tz = posix_time_zonerust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/posix_time_zone().("EST5EDT,J1,J365/5:12:34");
2675 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2676 to_datetime(&tz.rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]rule().().startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start., 2023),
2677 daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2023, 1, 1).atrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDate]at().(2, 0, 0, 0),
2678 );
2679 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2680 to_datetime(&tz.rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]rule().().endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end., 2023),
2681 daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2023, 12, 31).atrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDate]at().(5, 12, 34, 0),
2682 );
2683
2684 let tz = posix_time_zonerust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/posix_time_zone().("EST+5EDT,M3.2.0/2,M11.1.0/2");
2685 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2686 to_datetime(&tz.rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]rule().().startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start., 2024),
2687 daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2024, 3, 10).atrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDate]at().(2, 0, 0, 0),
2688 );
2689 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2690 to_datetime(&tz.rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]rule().().endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end., 2024),
2691 daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2024, 11, 3).atrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDate]at().(2, 0, 0, 0),
2692 );
2693
2694 let tz = posix_time_zonerust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/posix_time_zone().("EST+5EDT,M1.1.1,M12.5.2");
2695 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2696 to_datetime(&tz.rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]rule().().startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start., 2024),
2697 daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2024, 1, 1).atrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDate]at().(2, 0, 0, 0),
2698 );
2699 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2700 to_datetime(&tz.rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]rule().().endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end., 2024),
2701 daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2024, 12, 31).atrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDate]at().(2, 0, 0, 0),
2702 );
2703
2704 let tz = posix_time_zonerust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/posix_time_zone().("EST5EDT,0/0,J365/25");
2705 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2706 to_datetime(&tz.rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]rule().().startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start., 2024),
2707 daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2024, 1, 1).atrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDate]at().(0, 0, 0, 0),
2708 );
2709 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2710 to_datetime(&tz.rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]rule().().endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end., 2024),
2711 daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2024, 12, 31).atrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDate]at().(23, 59, 59, 999_999_999),
2712 );
2713
2714 let tz = posix_time_zonerust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/posix_time_zone().("XXX3EDT4,0/0,J365/23");
2715 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2716 to_datetime(&tz.rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]rule().().startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start., 2024),
2717 daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2024, 1, 1).atrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDate]at().(0, 0, 0, 0),
2718 );
2719 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2720 to_datetime(&tz.rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]rule().().endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end., 2024),
2721 daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2024, 12, 31).atrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDate]at().(23, 0, 0, 0),
2722 );
2723
2724 let tz = posix_time_zonerust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/posix_time_zone().("XXX3EDT4,0/0,365");
2725 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2726 to_datetime(&tz.rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]rule().().endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end., 2023),
2727 daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2023, 12, 31).atrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDate]at().(23, 59, 59, 999_999_999),
2728 );
2729 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2730 to_datetime(&tz.rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]rule().().endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end., 2024),
2731 daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2024, 12, 31).atrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDate]at().(2, 0, 0, 0),
2732 );
2733
2734 let tz = posix_time_zonerust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/posix_time_zone().("XXX3EDT4,J1/-167:59:59,J365/167:59:59");
2735 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2736 to_datetime(&tz.rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]rule().().startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start., 2024),
2737 daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2024, 1, 1).atrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDate]at().(0, 0, 0, 0),
2738 );
2739 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2740 to_datetime(&tz.rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]rule().().endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end., 2024),
2741 daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2024, 12, 31).atrust-analyzer cargo jiff-static 0.2.16 shared/util/itime/impl#[IDate]at().(23, 59, 59, 999_999_999),
2742 );
2743 }
2744
2745 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
2746 fn posix_date_time_spec_timerust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/posix_date_time_spec_time().() {
2747 let tz = posix_time_zonerust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/posix_time_zone().("EST5EDT,J1,J365/5:12:34");
2748 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(tz.rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]rule().().startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start..timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time., PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#::DEFAULTrust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixTime]DEFAULT.);
2749 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2750 tz.rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]rule().().endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end..timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.,
2751 PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.: 5 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). 12 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). 34 },
2752 );
2753 }
2754
2755 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
2756 fn posix_date_spec_to_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/posix_date_spec_to_date().() {
2757 let tz = posix_time_zonerust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/posix_time_zone().("EST+5EDT,M3.2.0/2,M11.1.0/2");
2758 let start = tz.rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]rule().().startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start..daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date..to_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixDay]to_date().(2023);
2759 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(start, Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2023, 3, 12)));
2760 let end = tz.rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]rule().().endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end..daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date..to_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixDay]to_date().(2023);
2761 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(end, Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2023, 11, 5)));
2762 let start = tz.rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]rule().().startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start..daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date..to_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixDay]to_date().(2024);
2763 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(start, Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2024, 3, 10)));
2764 let end = tz.rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]rule().().endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end..daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date..to_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixDay]to_date().(2024);
2765 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(end, Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2024, 11, 3)));
2766
2767 let tz = posix_time_zonerust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/posix_time_zone().("EST+5EDT,J60,J365");
2768 let start = tz.rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]rule().().startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start..daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date..to_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixDay]to_date().(2023);
2769 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(start, Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2023, 3, 1)));
2770 let end = tz.rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]rule().().endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end..daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date..to_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixDay]to_date().(2023);
2771 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(end, Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2023, 12, 31)));
2772 let start = tz.rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]rule().().startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start..daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date..to_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixDay]to_date().(2024);
2773 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(start, Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2024, 3, 1)));
2774 let end = tz.rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]rule().().endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end..daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date..to_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixDay]to_date().(2024);
2775 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(end, Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2024, 12, 31)));
2776
2777 let tz = posix_time_zonerust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/posix_time_zone().("EST+5EDT,59,365");
2778 let start = tz.rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]rule().().startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start..daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date..to_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixDay]to_date().(2023);
2779 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(start, Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2023, 3, 1)));
2780 let end = tz.rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]rule().().endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end..daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date..to_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixDay]to_date().(2023);
2781 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(end, Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#);
2782 let start = tz.rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]rule().().startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start..daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date..to_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixDay]to_date().(2024);
2783 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(start, Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2024, 2, 29)));
2784 let end = tz.rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]rule().().endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end..daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date..to_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixDay]to_date().(2024);
2785 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(end, Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2024, 12, 31)));
2786
2787 let tz = posix_time_zonerust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/posix_time_zone().("EST+5EDT,M1.1.1,M12.5.2");
2788 let start = tz.rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]rule().().startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start..daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date..to_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixDay]to_date().(2024);
2789 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(start, Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2024, 1, 1)));
2790 let end = tz.rulerust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<ABBREV>`]rule().().endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end..daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date..to_daterust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[PosixDay]to_date().(2024);
2791 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(end, Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(daterust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/date().(2024, 12, 31)));
2792 }
2793
2794 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
2795 fn posix_time_spec_to_civil_timerust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/posix_time_spec_to_civil_time().() {
2796 let tz = posix_time_zonerust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/posix_time_zone().("EST5EDT,J1,J365/5:12:34");
2797 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2798 tz.dstrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#dst..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().().rulerust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#rule..startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start..timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time..secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.,
2799 2 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60,
2800 );
2801 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2802 tz.dstrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#dst..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().().rulerust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#rule..endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end..timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time..secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.,
2803 5 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). 12 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). 34,
2804 );
2805
2806 let tz = posix_time_zonerust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/posix_time_zone().("EST5EDT,J1/23:59:59,J365/24:00:00");
2807 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2808 tz.dstrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#dst..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().().rulerust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#rule..startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start..timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time..secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.,
2809 23 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). 59 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Add<Self>`]add(). 59,
2810 );
2811 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2812 tz.dstrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#dst..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().().rulerust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#rule..endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end..timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time..secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.,
2813 24 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60,
2814 );
2815
2816 let tz = posix_time_zonerust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/posix_time_zone().("EST5EDT,J1/-1,J365/167:00:00");
2817 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2818 tz.dstrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#dst..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().().rulerust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#rule..startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start..timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time..secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.,
2819 -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().1 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60,
2820 );
2821 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2822 tz.dstrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#dst..as_refrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]as_ref().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().().rulerust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#rule..endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end..timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time..secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.,
2823 167 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60,
2824 );
2825 }
2826
2827 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
2828 fn parse_ianarust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/parse_iana().() {
2829 // Ref: https://github.com/chronotope/chrono/issues/1153
2830 let p = PosixTimeZonerust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#::parserust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<super::util::array_str::ArrayStr<ABBREVIATION_MAX>>`]parse().(b"CRAZY5SHORT,M12.5.0/50,0/2").unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().();
2831 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
2832 p,
2833 PosixTimeZonerust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone# {
2834 std_abbrevrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#std_abbrev.: "CRAZY".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(),
2835 std_offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#std_offset.: PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.: -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().5 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
2836 dstrust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#dst.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(PosixDstrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst# {
2837 abbrevrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#abbrev.: "SHORT".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(),
2838 offsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#offset.: PosixOffsetrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixOffset#second.: -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][Neg]neg().4 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
2839 rulerust-analyzer cargo jiff-static 0.2.16 shared/PosixDst#rule.: PosixRulerust-analyzer cargo jiff-static 0.2.16 shared/PosixRule# {
2840 startrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#start.: PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
2841 daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date.: PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::WeekdayOfMonthrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth# {
2842 monthrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#month.: 12,
2843 weekrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#week.: 5,
2844 weekdayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#WeekdayOfMonth#weekday.: 0,
2845 },
2846 timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.: PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.: 50 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
2847 },
2848 endrust-analyzer cargo jiff-static 0.2.16 shared/PosixRule#end.: PosixDayTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime# {
2849 daterust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#date.: PosixDayrust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#::JulianZerorust-analyzer cargo jiff-static 0.2.16 shared/PosixDay#JulianZero#(0),
2850 timerust-analyzer cargo jiff-static 0.2.16 shared/PosixDayTime#time.: PosixTimerust-analyzer cargo jiff-static 0.2.16 shared/PosixTime# { secondrust-analyzer cargo jiff-static 0.2.16 shared/PosixTime#second.: 2 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i32][`Mul<Self>`]mul(). 60 },
2851 },
2852 },
2853 }),
2854 },
2855 );
2856
2857 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(PosixTimeZonerust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#::parserust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<super::util::array_str::ArrayStr<ABBREVIATION_MAX>>`]parse().(b"America/New_York").is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2858 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(PosixTimeZonerust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#::parserust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<super::util::array_str::ArrayStr<ABBREVIATION_MAX>>`]parse().(b":America/New_York").is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2859 }
2860
2861 // See: https://github.com/BurntSushi/jiff/issues/407
2862 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
2863 fn parse_empty_is_errrust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/parse_empty_is_err().() {
2864 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(PosixTimeZonerust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#::parserust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<super::util::array_str::ArrayStr<ABBREVIATION_MAX>>`]parse().(b"").is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2865 }
2866
2867 // See: https://github.com/BurntSushi/jiff/issues/407
2868 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
2869 fn parse_weird_is_errrust-analyzer cargo jiff-static 0.2.16 shared/posix/tests/parse_weird_is_err().() {
2870 let s =
2871 b"AAAAAAAAAAAAAAACAAAAAAAAAAAAQA8AACAAAAAAAAAAAAAAAAACAAAAAAAAAAA";
2872 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(PosixTimeZonerust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#::parserust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<super::util::array_str::ArrayStr<ABBREVIATION_MAX>>`]parse().(s).is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2873
2874 let s =
2875 b"<AAAAAAAAAAAAAAACAAAAAAAAAAAAQA>8<AACAAAAAAAAAAAAAAAAACAAAAAAAAAAA>";
2876 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(PosixTimeZonerust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#::parserust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<super::util::array_str::ArrayStr<ABBREVIATION_MAX>>`]parse().(s).is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2877
2878 let s = b"PPPPPPPPPPPPPPPPPPPPnoofPPPAAA6DaPPPPPPPPPPPPPPPPPPPPPnoofPPPPP,n";
2879 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(PosixTimeZonerust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#::parserust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<super::util::array_str::ArrayStr<ABBREVIATION_MAX>>`]parse().(s).is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2880
2881 let s = b"oooooooooovooooooooooooooooool9<ooooo2o-o-oooooookoorooooooooroo8";
2882 assertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/assert!!(PosixTimeZonerust-analyzer cargo jiff-static 0.2.16 shared/PosixTimeZone#::parserust-analyzer cargo jiff-static 0.2.16 shared/posix/impl#[`PosixTimeZone<super::util::array_str::ArrayStr<ABBREVIATION_MAX>>`]parse().(s).is_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]is_err().());
2883 }
2884 }