format method

String format(
  1. Time time,
  2. TimeZoneInfo zone
)

See the Rust documentation for format for more information.

Throws DateTimeWriteError on failure.

Implementation

String format(Time time, TimeZoneInfo zone) {
  final write = _Write();
  final result = _icu4x_ZonedTimeFormatter_format_mv1(_ffi, time._ffi, zone._ffi, write._ffi);
  if (!result.isOk) {
    throw DateTimeWriteError.values[result.union.err];
  }
  return write.finalize();
}