| 1 |
import { FFIError } from "./diplomat-runtime" |
| 2 |
import { ICU4XDataProvider } from "./ICU4XDataProvider"; |
| 3 |
import { ICU4XDateLength } from "./ICU4XDateLength"; |
| 4 |
import { ICU4XError } from "./ICU4XError"; |
| 5 |
import { ICU4XIsoDate } from "./ICU4XIsoDate"; |
| 6 |
import { ICU4XIsoDateTime } from "./ICU4XIsoDateTime"; |
| 7 |
import { ICU4XLocale } from "./ICU4XLocale"; |
| 8 |
|
| 9 |
/** |
| 10 |
|
| 11 |
* An ICU4X TypedDateFormatter object capable of formatting a {@link ICU4XIsoDateTime `ICU4XIsoDateTime`} as a string, using the Gregorian Calendar. |
| 12 |
|
| 13 |
* See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TypedDateFormatter.html Rust documentation for `TypedDateFormatter`} for more information. |
| 14 |
*/ |
| 15 |
export class ICU4XGregorianDateFormatter { |
| 16 |
|
| 17 |
/** |
| 18 |
|
| 19 |
* Creates a new {@link ICU4XGregorianDateFormatter `ICU4XGregorianDateFormatter`} from locale data. |
| 20 |
|
| 21 |
* See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TypedDateFormatter.html#method.try_new_with_length Rust documentation for `try_new_with_length`} for more information. |
| 22 |
* @throws {@link FFIError}<{@link ICU4XError}> |
| 23 |
*/ |
| 24 |
static create_with_length(provider: ICU4XDataProvider, locale: ICU4XLocale, length: ICU4XDateLength): ICU4XGregorianDateFormatter | never; |
| 25 |
|
| 26 |
/** |
| 27 |
|
| 28 |
* Formats a {@link ICU4XIsoDate `ICU4XIsoDate`} to a string. |
| 29 |
|
| 30 |
* See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TypedDateFormatter.html#method.format Rust documentation for `format`} for more information. |
| 31 |
* @throws {@link FFIError}<{@link ICU4XError}> |
| 32 |
*/ |
| 33 |
format_iso_date(value: ICU4XIsoDate): string | never; |
| 34 |
|
| 35 |
/** |
| 36 |
|
| 37 |
* Formats a {@link ICU4XIsoDateTime `ICU4XIsoDateTime`} to a string. |
| 38 |
|
| 39 |
* See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TypedDateFormatter.html#method.format Rust documentation for `format`} for more information. |
| 40 |
* @throws {@link FFIError}<{@link ICU4XError}> |
| 41 |
*/ |
| 42 |
format_iso_datetime(value: ICU4XIsoDateTime): string | never; |
| 43 |
} |