tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

TimeZoneInfo.d.ts (3015B)


      1 // generated by diplomat-tool
      2 import type { IsoDate } from "./IsoDate"
      3 import type { IsoDateTime } from "./IsoDateTime"
      4 import type { Time } from "./Time"
      5 import type { TimeZone } from "./TimeZone"
      6 import type { TimeZoneVariant } from "./TimeZoneVariant"
      7 import type { UtcOffset } from "./UtcOffset"
      8 import type { VariantOffsetsCalculator } from "./VariantOffsetsCalculator"
      9 import type { pointer, codepoint } from "./diplomat-runtime.d.ts";
     10 
     11 
     12 /**
     13 * See the [Rust documentation for `TimeZoneInfo`](https://docs.rs/icu/latest/icu/time/struct.TimeZoneInfo.html) for more information.
     14 */
     15 
     16 
     17 export class TimeZoneInfo {
     18    get ffiValue(): pointer;
     19 
     20 
     21    /**
     22     * Creates a time zone for UTC (Coordinated Universal Time).
     23     *
     24     * See the [Rust documentation for `utc`](https://docs.rs/icu/latest/icu/time/struct.TimeZoneInfo.html#method.utc) for more information.
     25     */
     26    static utc(): TimeZoneInfo;
     27 
     28    /**
     29     * See the [Rust documentation for `id`](https://docs.rs/icu/latest/icu/time/struct.TimeZoneInfo.html#method.id) for more information.
     30     */
     31    id(): TimeZone;
     32 
     33    /**
     34     * Sets the datetime at which to interpret the time zone
     35     * for display name lookup.
     36     *
     37     * Notes:
     38     *
     39     * - If not set, the formatting datetime is used if possible.
     40     * - The constraints are the same as with `ZoneNameTimestamp` in Rust.
     41     * - Set to year 1000 or 9999 for a reference far in the past or future.
     42     *
     43     * See the [Rust documentation for `at_date_time_iso`](https://docs.rs/icu/latest/icu/time/struct.TimeZoneInfo.html#method.at_date_time_iso) for more information.
     44     *
     45     * Additional information: [1](https://docs.rs/icu/latest/icu/time/zone/struct.ZoneNameTimestamp.html)
     46     */
     47    atDateTimeIso(date: IsoDate, time: Time): TimeZoneInfo;
     48 
     49    /**
     50     * See the [Rust documentation for `zone_name_timestamp`](https://docs.rs/icu/latest/icu/time/struct.TimeZoneInfo.html#method.zone_name_timestamp) for more information.
     51     */
     52    zoneNameDateTime(): IsoDateTime | null;
     53 
     54    /**
     55     * See the [Rust documentation for `with_variant`](https://docs.rs/icu/latest/icu/time/struct.TimeZoneInfo.html#method.with_variant) for more information.
     56     */
     57    withVariant(timeVariant: TimeZoneVariant): TimeZoneInfo;
     58 
     59    /**
     60     * Infers the zone variant.
     61     *
     62     * Requires the offset and local time to be set.
     63     *
     64     * See the [Rust documentation for `infer_variant`](https://docs.rs/icu/latest/icu/time/struct.TimeZoneInfo.html#method.infer_variant) for more information.
     65     *
     66     * Additional information: [1](https://docs.rs/icu/latest/icu/time/zone/enum.TimeZoneVariant.html)
     67     */
     68    inferVariant(offsetCalculator: VariantOffsetsCalculator): boolean;
     69 
     70    /**
     71     * See the [Rust documentation for `variant`](https://docs.rs/icu/latest/icu/time/struct.TimeZoneInfo.html#method.variant) for more information.
     72     */
     73    variant(): TimeZoneVariant | null;
     74 
     75    constructor(id: TimeZone, offset: UtcOffset | null, variant: TimeZoneVariant | null);
     76 }