tor-browser

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

ZonedDateTime.d.ts (2362B)


      1 // generated by diplomat-tool
      2 import type { Calendar } from "./Calendar"
      3 import type { Date } from "./Date"
      4 import type { IanaParser } from "./IanaParser"
      5 import type { Rfc9557ParseError } from "./Rfc9557ParseError"
      6 import type { Time } from "./Time"
      7 import type { TimeZoneInfo } from "./TimeZoneInfo"
      8 import type { VariantOffsetsCalculator } from "./VariantOffsetsCalculator"
      9 import type { pointer, codepoint } from "./diplomat-runtime.d.ts";
     10 
     11 
     12 /**
     13 * An ICU4X DateTime object capable of containing a date, time, and zone for any calendar.
     14 *
     15 * See the [Rust documentation for `ZonedDateTime`](https://docs.rs/icu/latest/icu/time/struct.ZonedDateTime.html) for more information.
     16 */
     17 
     18 
     19 export class ZonedDateTime {
     20    get date(): Date;
     21    get time(): Time;
     22    get zone(): TimeZoneInfo;
     23 
     24 
     25    /**
     26     * Creates a new [`ZonedDateTime`] from an IXDTF string.
     27     *
     28     * See the [Rust documentation for `try_full_from_str`](https://docs.rs/icu/latest/icu/time/struct.ZonedDateTime.html#method.try_full_from_str) for more information.
     29     */
     30    static fullFromString(v: string, calendar: Calendar, ianaParser: IanaParser, offsetCalculator: VariantOffsetsCalculator): ZonedDateTime;
     31 
     32    /**
     33     * Creates a new [`ZonedDateTime`] from a location-only IXDTF string.
     34     *
     35     * See the [Rust documentation for `try_location_only_from_str`](https://docs.rs/icu/latest/icu/time/struct.ZonedDateTime.html#method.try_location_only_from_str) for more information.
     36     */
     37    static locationOnlyFromString(v: string, calendar: Calendar, ianaParser: IanaParser): ZonedDateTime;
     38 
     39    /**
     40     * Creates a new [`ZonedDateTime`] from an offset-only IXDTF string.
     41     *
     42     * See the [Rust documentation for `try_offset_only_from_str`](https://docs.rs/icu/latest/icu/time/struct.ZonedDateTime.html#method.try_offset_only_from_str) for more information.
     43     */
     44    static offsetOnlyFromString(v: string, calendar: Calendar): ZonedDateTime;
     45 
     46    /**
     47     * Creates a new [`ZonedDateTime`] from an IXDTF string, without requiring the offset or calculating the zone variant.
     48     *
     49     * See the [Rust documentation for `try_lenient_from_str`](https://docs.rs/icu/latest/icu/time/struct.ZonedDateTime.html#method.try_lenient_from_str) for more information.
     50     */
     51    static lenientFromString(v: string, calendar: Calendar, ianaParser: IanaParser): ZonedDateTime;
     52 }