// generated by diplomat-tool import type { DataProvider } from "./DataProvider" import type { Date } from "./Date" import type { DateTimeAlignment } from "./DateTimeAlignment" import type { DateTimeFormatterLoadError } from "./DateTimeFormatterLoadError" import type { DateTimeLength } from "./DateTimeLength" import type { DateTimeMismatchedCalendarError } from "./DateTimeMismatchedCalendarError" import type { IsoDate } from "./IsoDate" import type { Locale } from "./Locale" import type { YearStyle } from "./YearStyle" import type { pointer, codepoint } from "./diplomat-runtime.d.ts"; /** * See the [Rust documentation for `DateTimeFormatter`](https://docs.rs/icu/2.1.1/icu/datetime/struct.DateTimeFormatter.html) for more information. */ export class DateFormatter { /** @internal */ get ffiValue(): pointer; /** @internal */ constructor(); /** * See the [Rust documentation for `try_new`](https://docs.rs/icu/2.1.1/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information. * * See the [Rust documentation for `D`](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.D.html) for more information. * * Additional information: [1](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.D.html#method.with_alignment), [2](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.D.html#method.for_length) */ static createD(locale: Locale, length: DateTimeLength | null, alignment: DateTimeAlignment | null): DateFormatter; /** * See the [Rust documentation for `try_new`](https://docs.rs/icu/2.1.1/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information. * * See the [Rust documentation for `D`](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.D.html) for more information. * * Additional information: [1](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.D.html#method.with_alignment), [2](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.D.html#method.for_length) */ static createDWithProvider(provider: DataProvider, locale: Locale, length: DateTimeLength | null, alignment: DateTimeAlignment | null): DateFormatter; /** * See the [Rust documentation for `try_new`](https://docs.rs/icu/2.1.1/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information. * * See the [Rust documentation for `MD`](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.MD.html) for more information. * * Additional information: [1](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.MD.html#method.with_alignment), [2](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.MD.html#method.for_length) */ static createMd(locale: Locale, length: DateTimeLength | null, alignment: DateTimeAlignment | null): DateFormatter; /** * See the [Rust documentation for `try_new`](https://docs.rs/icu/2.1.1/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information. * * See the [Rust documentation for `MD`](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.MD.html) for more information. * * Additional information: [1](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.MD.html#method.with_alignment), [2](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.MD.html#method.for_length) */ static createMdWithProvider(provider: DataProvider, locale: Locale, length: DateTimeLength | null, alignment: DateTimeAlignment | null): DateFormatter; /** * See the [Rust documentation for `try_new`](https://docs.rs/icu/2.1.1/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information. * * See the [Rust documentation for `YMD`](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.YMD.html) for more information. * * Additional information: [1](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.YMD.html#method.with_alignment), [2](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.YMD.html#method.with_year_style), [3](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.YMD.html#method.for_length) */ static createYmd(locale: Locale, length: DateTimeLength | null, alignment: DateTimeAlignment | null, yearStyle: YearStyle | null): DateFormatter; /** * See the [Rust documentation for `try_new`](https://docs.rs/icu/2.1.1/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information. * * See the [Rust documentation for `YMD`](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.YMD.html) for more information. * * Additional information: [1](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.YMD.html#method.with_alignment), [2](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.YMD.html#method.with_year_style), [3](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.YMD.html#method.for_length) */ static createYmdWithProvider(provider: DataProvider, locale: Locale, length: DateTimeLength | null, alignment: DateTimeAlignment | null, yearStyle: YearStyle | null): DateFormatter; /** * See the [Rust documentation for `try_new`](https://docs.rs/icu/2.1.1/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information. * * See the [Rust documentation for `DE`](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.DE.html) for more information. * * Additional information: [1](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.DE.html#method.with_alignment), [2](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.DE.html#method.for_length) */ static createDe(locale: Locale, length: DateTimeLength | null, alignment: DateTimeAlignment | null): DateFormatter; /** * See the [Rust documentation for `try_new`](https://docs.rs/icu/2.1.1/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information. * * See the [Rust documentation for `DE`](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.DE.html) for more information. * * Additional information: [1](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.DE.html#method.with_alignment), [2](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.DE.html#method.for_length) */ static createDeWithProvider(provider: DataProvider, locale: Locale, length: DateTimeLength | null, alignment: DateTimeAlignment | null): DateFormatter; /** * See the [Rust documentation for `try_new`](https://docs.rs/icu/2.1.1/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information. * * See the [Rust documentation for `MDE`](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.MDE.html) for more information. * * Additional information: [1](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.MDE.html#method.with_alignment), [2](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.MDE.html#method.for_length) */ static createMde(locale: Locale, length: DateTimeLength | null, alignment: DateTimeAlignment | null): DateFormatter; /** * See the [Rust documentation for `try_new`](https://docs.rs/icu/2.1.1/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information. * * See the [Rust documentation for `MDE`](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.MDE.html) for more information. * * Additional information: [1](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.MDE.html#method.with_alignment), [2](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.MDE.html#method.for_length) */ static createMdeWithProvider(provider: DataProvider, locale: Locale, length: DateTimeLength | null, alignment: DateTimeAlignment | null): DateFormatter; /** * See the [Rust documentation for `try_new`](https://docs.rs/icu/2.1.1/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information. * * See the [Rust documentation for `YMDE`](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.YMDE.html) for more information. * * Additional information: [1](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.YMDE.html#method.with_alignment), [2](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.YMDE.html#method.with_year_style), [3](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.YMDE.html#method.for_length) */ static createYmde(locale: Locale, length: DateTimeLength | null, alignment: DateTimeAlignment | null, yearStyle: YearStyle | null): DateFormatter; /** * See the [Rust documentation for `try_new`](https://docs.rs/icu/2.1.1/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information. * * See the [Rust documentation for `YMDE`](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.YMDE.html) for more information. * * Additional information: [1](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.YMDE.html#method.with_alignment), [2](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.YMDE.html#method.with_year_style), [3](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.YMDE.html#method.for_length) */ static createYmdeWithProvider(provider: DataProvider, locale: Locale, length: DateTimeLength | null, alignment: DateTimeAlignment | null, yearStyle: YearStyle | null): DateFormatter; /** * See the [Rust documentation for `try_new`](https://docs.rs/icu/2.1.1/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information. * * See the [Rust documentation for `E`](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.E.html) for more information. * * Additional information: [1](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.E.html#method.for_length) */ static createE(locale: Locale, length: DateTimeLength | null): DateFormatter; /** * See the [Rust documentation for `try_new`](https://docs.rs/icu/2.1.1/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information. * * See the [Rust documentation for `E`](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.E.html) for more information. * * Additional information: [1](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.E.html#method.for_length) */ static createEWithProvider(provider: DataProvider, locale: Locale, length: DateTimeLength | null): DateFormatter; /** * See the [Rust documentation for `try_new`](https://docs.rs/icu/2.1.1/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information. * * See the [Rust documentation for `M`](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.M.html) for more information. * * Additional information: [1](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.M.html#method.with_alignment), [2](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.M.html#method.for_length) */ static createM(locale: Locale, length: DateTimeLength | null, alignment: DateTimeAlignment | null): DateFormatter; /** * See the [Rust documentation for `try_new`](https://docs.rs/icu/2.1.1/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information. * * See the [Rust documentation for `M`](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.M.html) for more information. * * Additional information: [1](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.M.html#method.with_alignment), [2](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.M.html#method.for_length) */ static createMWithProvider(provider: DataProvider, locale: Locale, length: DateTimeLength | null, alignment: DateTimeAlignment | null): DateFormatter; /** * See the [Rust documentation for `try_new`](https://docs.rs/icu/2.1.1/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information. * * See the [Rust documentation for `YM`](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.YM.html) for more information. * * Additional information: [1](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.YM.html#method.with_alignment), [2](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.YM.html#method.with_year_style), [3](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.YM.html#method.for_length) */ static createYm(locale: Locale, length: DateTimeLength | null, alignment: DateTimeAlignment | null, yearStyle: YearStyle | null): DateFormatter; /** * See the [Rust documentation for `try_new`](https://docs.rs/icu/2.1.1/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information. * * See the [Rust documentation for `YM`](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.YM.html) for more information. * * Additional information: [1](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.YM.html#method.with_alignment), [2](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.YM.html#method.with_year_style), [3](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.YM.html#method.for_length) */ static createYmWithProvider(provider: DataProvider, locale: Locale, length: DateTimeLength | null, alignment: DateTimeAlignment | null, yearStyle: YearStyle | null): DateFormatter; /** * See the [Rust documentation for `try_new`](https://docs.rs/icu/2.1.1/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information. * * See the [Rust documentation for `Y`](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.Y.html) for more information. * * Additional information: [1](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.Y.html#method.with_alignment), [2](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.Y.html#method.with_year_style), [3](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.Y.html#method.for_length) */ static createY(locale: Locale, length: DateTimeLength | null, alignment: DateTimeAlignment | null, yearStyle: YearStyle | null): DateFormatter; /** * See the [Rust documentation for `try_new`](https://docs.rs/icu/2.1.1/icu/datetime/struct.DateTimeFormatter.html#method.try_new) for more information. * * See the [Rust documentation for `Y`](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.Y.html) for more information. * * Additional information: [1](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.Y.html#method.with_alignment), [2](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.Y.html#method.with_year_style), [3](https://docs.rs/icu/2.1.1/icu/datetime/fieldsets/struct.Y.html#method.for_length) */ static createYWithProvider(provider: DataProvider, locale: Locale, length: DateTimeLength | null, alignment: DateTimeAlignment | null, yearStyle: YearStyle | null): DateFormatter; /** * See the [Rust documentation for `format`](https://docs.rs/icu/2.1.1/icu/datetime/struct.DateTimeFormatter.html#method.format) for more information. */ formatIso(isoDate: IsoDate): string; /** * See the [Rust documentation for `format_same_calendar`](https://docs.rs/icu/2.1.1/icu/datetime/struct.DateTimeFormatter.html#method.format_same_calendar) for more information. */ formatSameCalendar(date: Date): string; }