| 1 |
import { FFIError } from "./diplomat-runtime" |
| 2 |
import { ICU4XCustomTimeZone } from "./ICU4XCustomTimeZone"; |
| 3 |
import { ICU4XDataProvider } from "./ICU4XDataProvider"; |
| 4 |
import { ICU4XDateLength } from "./ICU4XDateLength"; |
| 5 |
import { ICU4XError } from "./ICU4XError"; |
| 6 |
import { ICU4XIsoDateTime } from "./ICU4XIsoDateTime"; |
| 7 |
import { ICU4XIsoTimeZoneOptions } from "./ICU4XIsoTimeZoneOptions"; |
| 8 |
import { ICU4XLocale } from "./ICU4XLocale"; |
| 9 |
import { ICU4XTimeLength } from "./ICU4XTimeLength"; |
| 10 |
|
| 11 |
/** |
| 12 |
|
| 13 |
* An object capable of formatting a date time with time zone to a string. |
| 14 |
|
| 15 |
* See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TypedZonedDateTimeFormatter.html Rust documentation for `TypedZonedDateTimeFormatter`} for more information. |
| 16 |
*/ |
| 17 |
export class ICU4XGregorianZonedDateTimeFormatter { |
| 18 |
|
| 19 |
/** |
| 20 |
|
| 21 |
* Creates a new {@link ICU4XGregorianZonedDateTimeFormatter `ICU4XGregorianZonedDateTimeFormatter`} from locale data. |
| 22 |
|
| 23 |
* This function has `date_length` and `time_length` arguments and uses default options for the time zone. |
| 24 |
|
| 25 |
* See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TypedZonedDateTimeFormatter.html#method.try_new Rust documentation for `try_new`} for more information. |
| 26 |
* @throws {@link FFIError}<{@link ICU4XError}> |
| 27 |
*/ |
| 28 |
static create_with_lengths(provider: ICU4XDataProvider, locale: ICU4XLocale, date_length: ICU4XDateLength, time_length: ICU4XTimeLength): ICU4XGregorianZonedDateTimeFormatter | never; |
| 29 |
|
| 30 |
/** |
| 31 |
|
| 32 |
* Creates a new {@link ICU4XGregorianZonedDateTimeFormatter `ICU4XGregorianZonedDateTimeFormatter`} from locale data. |
| 33 |
|
| 34 |
* This function has `date_length` and `time_length` arguments and uses an ISO-8601 style fallback for the time zone with the given configurations. |
| 35 |
|
| 36 |
* See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TypedZonedDateTimeFormatter.html#method.try_new Rust documentation for `try_new`} for more information. |
| 37 |
* @throws {@link FFIError}<{@link ICU4XError}> |
| 38 |
*/ |
| 39 |
static create_with_lengths_and_iso_8601_time_zone_fallback(provider: ICU4XDataProvider, locale: ICU4XLocale, date_length: ICU4XDateLength, time_length: ICU4XTimeLength, zone_options: ICU4XIsoTimeZoneOptions): ICU4XGregorianZonedDateTimeFormatter | never; |
| 40 |
|
| 41 |
/** |
| 42 |
|
| 43 |
* Formats a {@link ICU4XIsoDateTime `ICU4XIsoDateTime`} and {@link ICU4XCustomTimeZone `ICU4XCustomTimeZone`} to a string. |
| 44 |
|
| 45 |
* See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TypedZonedDateTimeFormatter.html#method.format Rust documentation for `format`} for more information. |
| 46 |
* @throws {@link FFIError}<{@link ICU4XError}> |
| 47 |
*/ |
| 48 |
format_iso_datetime_with_custom_time_zone(datetime: ICU4XIsoDateTime, time_zone: ICU4XCustomTimeZone): string | never; |
| 49 |
} |