Skip to content

Commit fd2a15d

Browse files
committed
Add full support for U datetime symbol
1 parent e0c2dad commit fd2a15d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

components/datetime/src/format/datetime.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,16 @@ where
175175
(FieldSymbol::Year(Year::Cyclic), l) => {
176176
const PART: Part = parts::YEAR_NAME;
177177
input!(PART, Year, year = input.year);
178-
input!(PART, YearCyclic, cyclic = year.cyclic());
178+
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+
};
179188

180189
match datetime_names.get_name_for_cyclic(l, cyclic.year) {
181190
Ok(name) => Ok(w.with_part(PART, |w| w.write_str(name))?),

0 commit comments

Comments
 (0)