Time.d.ts (2320B)
1 // generated by diplomat-tool 2 import type { CalendarError } from "./CalendarError" 3 import type { Rfc9557ParseError } from "./Rfc9557ParseError" 4 import type { pointer, codepoint } from "./diplomat-runtime.d.ts"; 5 6 7 /** 8 * An ICU4X Time object representing a time in terms of hour, minute, second, nanosecond 9 * 10 * See the [Rust documentation for `Time`](https://docs.rs/icu/latest/icu/time/struct.Time.html) for more information. 11 */ 12 13 14 export class Time { 15 get ffiValue(): pointer; 16 17 18 /** 19 * Creates a new [`Time`] from an IXDTF string. 20 * 21 * See the [Rust documentation for `try_from_str`](https://docs.rs/icu/latest/icu/time/struct.Time.html#method.try_from_str) for more information. 22 */ 23 static fromString(v: string): Time; 24 25 /** 26 * Creates a new [`Time`] representing the start of the day (00:00:00.000). 27 * 28 * See the [Rust documentation for `start_of_day`](https://docs.rs/icu/latest/icu/time/struct.Time.html#method.start_of_day) for more information. 29 */ 30 static startOfDay(): Time; 31 32 /** 33 * Creates a new [`Time`] representing noon (12:00:00.000). 34 * 35 * See the [Rust documentation for `noon`](https://docs.rs/icu/latest/icu/time/struct.Time.html#method.noon) for more information. 36 */ 37 static noon(): Time; 38 39 /** 40 * Returns the hour in this time 41 * 42 * See the [Rust documentation for `hour`](https://docs.rs/icu/latest/icu/time/struct.Time.html#structfield.hour) for more information. 43 */ 44 get hour(): number; 45 46 /** 47 * Returns the minute in this time 48 * 49 * See the [Rust documentation for `minute`](https://docs.rs/icu/latest/icu/time/struct.Time.html#structfield.minute) for more information. 50 */ 51 get minute(): number; 52 53 /** 54 * Returns the second in this time 55 * 56 * See the [Rust documentation for `second`](https://docs.rs/icu/latest/icu/time/struct.Time.html#structfield.second) for more information. 57 */ 58 get second(): number; 59 60 /** 61 * Returns the subsecond in this time as nanoseconds 62 * 63 * See the [Rust documentation for `subsecond`](https://docs.rs/icu/latest/icu/time/struct.Time.html#structfield.subsecond) for more information. 64 */ 65 get subsecond(): number; 66 67 constructor(hour: number, minute: number, second: number, subsecond: number); 68 }