UNPKG

@rr0/time

Version:
19 lines (15 loc) 494 B
import { Level0ComponentParser } from "../component/Level0ComponentParser.mjs" import { RegExpFormat } from "../../util/regexp/RegExpFormat.mjs" const name = "hourValue" export class Level0HourParser extends Level0ComponentParser { /** * @param {string} prefix * @return {string} */ static format(prefix = "") { return RegExpFormat.numberGroup(RegExpFormat.groupName(prefix, name), "{1,2}", undefined) } constructor () { super(name, Level0HourParser.format()) } }