@rr0/time
Version:
EDTF parsing
19 lines (15 loc) • 500 B
JavaScript
import { Level0ComponentParser } from "../component/Level0ComponentParser.mjs"
import { RegExpFormat } from "../../util/regexp/RegExpFormat.mjs"
const name = "minuteValue"
export class Level0MinuteParser extends Level0ComponentParser {
/**
* @param {string} prefix
* @return {string}
*/
static format(prefix = "") {
return RegExpFormat.numberGroup(RegExpFormat.groupName(prefix, name), "{1,2}", undefined)
}
constructor () {
super(name, Level0MinuteParser.format())
}
}