tor-browser

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

UtcOffset.d.ts (3444B)


      1 // generated by diplomat-tool
      2 import type { TimeZoneInvalidOffsetError } from "./TimeZoneInvalidOffsetError"
      3 import type { pointer, codepoint } from "./diplomat-runtime.d.ts";
      4 
      5 
      6 /**
      7 * See the [Rust documentation for `UtcOffset`](https://docs.rs/icu/latest/icu/time/zone/struct.UtcOffset.html) for more information.
      8 */
      9 
     10 
     11 export class UtcOffset {
     12    get ffiValue(): pointer;
     13 
     14 
     15    /**
     16     * Creates an offset from seconds.
     17     *
     18     * Errors if the offset seconds are out of range.
     19     *
     20     * See the [Rust documentation for `try_from_seconds`](https://docs.rs/icu/latest/icu/time/zone/struct.UtcOffset.html#method.try_from_seconds) for more information.
     21     */
     22    static fromSeconds(seconds: number): UtcOffset;
     23 
     24    /**
     25     * Creates an offset from a string.
     26     *
     27     * See the [Rust documentation for `try_from_str`](https://docs.rs/icu/latest/icu/time/zone/struct.UtcOffset.html#method.try_from_str) for more information.
     28     *
     29     * Additional information: [1](https://docs.rs/icu/latest/icu/time/zone/struct.UtcOffset.html)
     30     */
     31    static fromString(offset: string): UtcOffset;
     32 
     33    /**
     34     * Returns the value as offset seconds.
     35     *
     36     * See the [Rust documentation for `offset`](https://docs.rs/icu/latest/icu/time/struct.TimeZoneInfo.html#method.offset) for more information.
     37     *
     38     * See the [Rust documentation for `to_seconds`](https://docs.rs/icu/latest/icu/time/zone/struct.UtcOffset.html#method.to_seconds) for more information.
     39     *
     40     * Additional information: [1](https://docs.rs/icu/latest/icu/time/zone/struct.UtcOffset.html)
     41     */
     42    get seconds(): number;
     43 
     44    /**
     45     * Returns whether the offset is positive.
     46     *
     47     * See the [Rust documentation for `is_non_negative`](https://docs.rs/icu/latest/icu/time/zone/struct.UtcOffset.html#method.is_non_negative) for more information.
     48     *
     49     * Additional information: [1](https://docs.rs/icu/latest/icu/time/zone/struct.UtcOffset.html)
     50     */
     51    get isNonNegative(): boolean;
     52 
     53    /**
     54     * Returns whether the offset is zero.
     55     *
     56     * See the [Rust documentation for `is_zero`](https://docs.rs/icu/latest/icu/time/zone/struct.UtcOffset.html#method.is_zero) for more information.
     57     *
     58     * Additional information: [1](https://docs.rs/icu/latest/icu/time/zone/struct.UtcOffset.html)
     59     */
     60    get isZero(): boolean;
     61 
     62    /**
     63     * Returns the hours part of the offset.
     64     *
     65     * See the [Rust documentation for `hours_part`](https://docs.rs/icu/latest/icu/time/zone/struct.UtcOffset.html#method.hours_part) for more information.
     66     *
     67     * Additional information: [1](https://docs.rs/icu/latest/icu/time/zone/struct.UtcOffset.html)
     68     */
     69    get hoursPart(): number;
     70 
     71    /**
     72     * Returns the minutes part of the offset.
     73     *
     74     * See the [Rust documentation for `minutes_part`](https://docs.rs/icu/latest/icu/time/zone/struct.UtcOffset.html#method.minutes_part) for more information.
     75     *
     76     * Additional information: [1](https://docs.rs/icu/latest/icu/time/zone/struct.UtcOffset.html)
     77     */
     78    get minutesPart(): number;
     79 
     80    /**
     81     * Returns the seconds part of the offset.
     82     *
     83     * See the [Rust documentation for `seconds_part`](https://docs.rs/icu/latest/icu/time/zone/struct.UtcOffset.html#method.seconds_part) for more information.
     84     *
     85     * Additional information: [1](https://docs.rs/icu/latest/icu/time/zone/struct.UtcOffset.html)
     86     */
     87    get secondsPart(): number;
     88 }