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.
1 parent 11ece1a commit 9a1e479Copy full SHA for 9a1e479
components/calendar/examples/date_try_from_fields.rs
@@ -1,14 +1,14 @@
1
-use icu_calendar::{AnyCalendar, AnyCalendarKind, Date};
2
-use icu_calendar::types::DateFields;
3
use icu_calendar::error::DateFromFieldsError;
+use icu_calendar::types::DateFields;
+use icu_calendar::{AnyCalendar, AnyCalendarKind, Date};
4
5
fn main() -> Result<(), DateFromFieldsError> {
6
let cal = AnyCalendar::new(AnyCalendarKind::Iso);
7
8
let mut fields = DateFields::default();
9
10
fields.extended_year = Some(2024);
11
- fields.month_code = Some(b"M03");
+ fields.month_code = Some(b"M03");
12
fields.day = Some(15);
13
14
let date = Date::try_from_fields(fields, Default::default(), cal)?;
0 commit comments