@rr0/time
Version:
EDTF parsing
89 lines • 2.42 kB
text/typescript
/**
* Parses date strings in the EDTF/ISO-8601 level 2 format.
*
* @template Y extends Level1Year
* @template M extends Level1Month
* @template D extends Level1Day
* @template H extends Level1Hour
* @template M extends Level1Minute
* @template S extends Level1Second
* @template Z extends Level1Timeshift
*/
export class Level2DateParser<Y, M, D, H, S, Z> extends EDTFParser<any> {
/**
* @readonly
* @type {string}
*/
static readonly yearGroup: string;
/**
* @readonly
* @type {string}
*/
static readonly monthGroup: string;
/**
* @readonly
* @type {string}
*/
static readonly dayGroup: string;
/**
* @readonly
* @type {string}
*/
static readonly hourGroup: string;
/**
* @readonly
* @type {string}
*/
static readonly minuteGroup: string;
/**
* @readonly
* @type {string}
*/
static readonly secondGroup: string;
/**
* @readonly
* @type {string}
*/
static readonly timeshiftGroup: string;
/**
* @param {string} [prefix] A prefix for the group names, if any.
* @return string
*/
static format(prefix?: string): string;
constructor();
parseGroups(groups: any): {
year: Level2Year | {
start: Level2Year;
end: Level2Year;
};
month: Level2Month | {
start: Level2Month;
end: Level2Month;
};
day: Level2Day | {
start: Level2Day;
end: Level2Day;
};
hour: Level2Hour | {
start: Level2Hour;
end: Level2Hour;
};
minute: Level2Minute | {
start: Level2Minute;
end: Level2Minute;
};
second: Level2Second | {
start: Level2Second;
end: Level2Second;
};
timeshift: import("../../index.mjs").Level1Timeshift;
};
}
import { EDTFParser } from "../../EDTFParser.mjs";
import { Level2Year } from "../year/index.mjs";
import { Level2Month } from "../../level2/month/Level2Month.mjs";
import { Level2Day } from "../../level2/day/Level2Day.mjs";
import { Level2Hour } from "../../level2/hour/Level2Hour.mjs";
import { Level2Minute } from "../../level2/minute/Level2Minute.mjs";
import { Level2Second } from "../../level2/second/Level2Second.mjs";
//# sourceMappingURL=Level2DateParser.d.mts.map