summaryrefslogtreecommitdiffstats
path: root/intl/icu_capi/js/package/lib/ICU4XCalendar.d.ts
blob: e1662c9cad9025141fcccd5b983d168cbed1b870 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import { FFIError } from "./diplomat-runtime"
import { ICU4XAnyCalendarKind } from "./ICU4XAnyCalendarKind";
import { ICU4XDataProvider } from "./ICU4XDataProvider";
import { ICU4XError } from "./ICU4XError";
import { ICU4XLocale } from "./ICU4XLocale";

/**

 * See the {@link https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendar.html Rust documentation for `AnyCalendar`} for more information.
 */
export class ICU4XCalendar {

  /**

   * Creates a new {@link ICU4XCalendar `ICU4XCalendar`} from the specified date and time.

   * See the {@link https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendar.html#method.new_for_locale Rust documentation for `new_for_locale`} for more information.
   * @throws {@link FFIError}<{@link ICU4XError}>
   */
  static create_for_locale(provider: ICU4XDataProvider, locale: ICU4XLocale): ICU4XCalendar | never;

  /**

   * Creates a new {@link ICU4XCalendar `ICU4XCalendar`} from the specified date and time.

   * See the {@link https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendar.html#method.new Rust documentation for `new`} for more information.
   * @throws {@link FFIError}<{@link ICU4XError}>
   */
  static create_for_kind(provider: ICU4XDataProvider, kind: ICU4XAnyCalendarKind): ICU4XCalendar | never;

  /**

   * Returns the kind of this calendar

   * See the {@link https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendar.html#method.kind Rust documentation for `kind`} for more information.
   */
  kind(): ICU4XAnyCalendarKind;
}