WeekInformation constructor

WeekInformation(
  1. Locale locale
)

Creates a new WeekInformation from locale data using compiled data.

See the Rust documentation for try_new for more information.

Throws DataError on failure.

Implementation

factory WeekInformation(Locale locale) {
  final result = _icu4x_WeekInformation_create_mv1(locale._ffi);
  if (!result.isOk) {
    throw DataError.values[result.union.err];
  }
  return WeekInformation._fromFfi(result.union.ok, []);
}