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