UNPKG

@rr0/time

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