Date.fromRataDie constructor
Creates a new Date from the given Rata Die
See the Rust documentation for from_rata_die
for more information.
Throws CalendarError on failure.
Implementation
factory Date.fromRataDie(int rd, Calendar calendar) {
final result = _icu4x_Date_from_rata_die_mv1(rd, calendar._ffi);
if (!result.isOk) {
throw CalendarError.values[result.union.err];
}
return Date._fromFfi(result.union.ok, []);
}