UNPKG

@rr0/time

Version:
61 lines 2.76 kB
/** @import { EDTFParser } from "../../EDTFParser.mjs" */ /** @import { Level0DateSpec } from "../../level0/date/Level0Date.mjs" */ /** @import { Level1Component } from "../component/index.mjs" */ /** @import { Level1Timeshift } from "../timeshift/index.mjs" */ /** * @typedef {Level0DateSpec} Level1DateSpec */ /** * @template {Level1Year} [Y = Level1Year] * @template {Level1Month} [MM = Level1Month] * @template {Level1Day} [D = Level1Day] * @template {Level1Hour} [H = Level1Hour] * @template {Level1Minute} [M = Level1Minute] * @template {Level1Second} [S = Level1Second] * @template {Level1Timeshift} [Z = Level1Timeshift] * @extends {Level0Date<Level1Year, Level1Month, Level1Day, Level1Hour, Level1Minute, Level1Second, Level1Timeshift>} */ export class Level1Date<Y extends Level1Year = Level1Year, MM extends Level1Month = Level1Month, D extends Level1Day = Level1Day, H extends Level1Hour = Level1Hour, M extends Level1Minute = Level1Minute, S extends Level1Second = Level1Second, Z extends Level1Timeshift = Level1Timeshift> extends Level0Date<Level1Year, Level1Month, Level1Day, Level1Hour, Level1Minute, Level1Second, Level1Timeshift> { /** * @param {Date} date * @return {Level1Date} */ static fromDate(date: Date): Level1Date; /** * @param {string} str An EDTF level 0-1 string * @param {EDTFParser} parser * @return {Level1Date} */ static fromString(str: string, parser?: EDTFParser<any>): Level1Date; static newInstance(): Level1Date<Level1Year, Level1Month, Level1Day, Level1Hour, Level1Minute, Level1Second, Level1Timeshift>; /** * @param {Level1DateSpec} [spec] */ constructor(spec?: Level1DateSpec); /** * @type {Level1Factory} */ get factory(): Level1Factory<any, any, any, any, any, any, any>; /** * @return boolean */ get uncertain(): boolean; /** * @return boolean */ get approximate(): boolean; clone(): Level1Date<Level1Year, Level1Month, Level1Day, Level1Hour, Level1Minute, Level1Second, Level1Timeshift>; } export type Level1DateSpec = Level0DateSpec; import { Level1Year } from "../year/index.mjs"; import { Level1Month } from "../month/index.mjs"; import { Level1Day } from "../day/index.mjs"; import { Level1Hour } from "../hour/index.mjs"; import { Level1Minute } from "../minute/index.mjs"; import { Level1Second } from "../second/index.mjs"; import type { Level1Timeshift } from "../timeshift/index.mjs"; import { Level0Date } from "../../level0/index.mjs"; import { Level1Factory } from "../Level1Factory.mjs"; import type { EDTFParser } from "../../EDTFParser.mjs"; import type { Level0DateSpec } from "../../level0/date/Level0Date.mjs"; //# sourceMappingURL=Level1Date.d.mts.map