Date.fromIsoInCalendar constructor
Creates a new Date representing the ISO date given but in a given calendar
See the Rust documentation for new_from_iso
for more information.
Throws CalendarError on failure.
Implementation
factory Date.fromIsoInCalendar(int isoYear, int isoMonth, int isoDay, Calendar calendar) {
final result = _icu4x_Date_from_iso_in_calendar_mv1(isoYear, isoMonth, isoDay, calendar._ffi);
if (!result.isOk) {
throw CalendarError.values[result.union.err];
}
return Date._fromFfi(result.union.ok, []);
}