We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
U
1 parent e0c2dad commit fd2a15dCopy full SHA for fd2a15d
components/datetime/src/format/datetime.rs
@@ -175,7 +175,16 @@ where
175
(FieldSymbol::Year(Year::Cyclic), l) => {
176
const PART: Part = parts::YEAR_NAME;
177
input!(PART, Year, year = input.year);
178
- input!(PART, YearCyclic, cyclic = year.cyclic());
+
179
+ let Some(cyclic) = year.cyclic() else {
180
+ return try_write_number(
181
+ PART,
182
+ w,
183
+ decimal_formatter,
184
+ year.era_year_or_related_iso().into(),
185
+ FieldLength::One,
186
+ );
187
+ };
188
189
match datetime_names.get_name_for_cyclic(l, cyclic.year) {
190
Ok(name) => Ok(w.with_part(PART, |w| w.write_str(name))?),
0 commit comments