WeekInformation.d.ts (1967B)
1 // generated by diplomat-tool 2 import type { DataError } from "./DataError" 3 import type { DataProvider } from "./DataProvider" 4 import type { Locale } from "./Locale" 5 import type { Weekday } from "./Weekday" 6 import type { WeekdaySetIterator } from "./WeekdaySetIterator" 7 import type { pointer, codepoint } from "./diplomat-runtime.d.ts"; 8 9 10 /** 11 * A Week calculator, useful to be passed in to `week_of_year()` on Date and DateTime types 12 * 13 * See the [Rust documentation for `WeekInformation`](https://docs.rs/icu/latest/icu/calendar/week/struct.WeekInformation.html) for more information. 14 */ 15 16 17 export class WeekInformation { 18 get ffiValue(): pointer; 19 20 21 /** 22 * Creates a new [`WeekInformation`] from locale data using a particular data source. 23 * 24 * See the [Rust documentation for `try_new`](https://docs.rs/icu/latest/icu/calendar/week/struct.WeekInformation.html#method.try_new) for more information. 25 */ 26 static createWithProvider(provider: DataProvider, locale: Locale): WeekInformation; 27 28 /** 29 * Returns the weekday that starts the week for this object's locale 30 * 31 * See the [Rust documentation for `first_weekday`](https://docs.rs/icu/latest/icu/calendar/week/struct.WeekInformation.html#structfield.first_weekday) for more information. 32 */ 33 get firstWeekday(): Weekday; 34 35 /** 36 * See the [Rust documentation for `weekend`](https://docs.rs/icu/latest/icu/calendar/week/struct.WeekInformation.html#structfield.weekend) for more information. 37 * 38 * See the [Rust documentation for `contains`](https://docs.rs/icu/latest/icu/calendar/provider/struct.WeekdaySet.html#method.contains) for more information. 39 */ 40 isWeekend(day: Weekday): boolean; 41 42 /** 43 * See the [Rust documentation for `weekend`](https://docs.rs/icu/latest/icu/calendar/week/struct.WeekInformation.html#method.weekend) for more information. 44 */ 45 get weekend(): WeekdaySetIterator; 46 47 constructor(locale: Locale); 48 }