in sources/src/main/resources/META-INF/resources/view.js [237:248]
static parse(durationString) {
const match = durationString.match(/^P((\d+)D)?(T((\d+)H)?((\d+)M)?((\d+)S)?)?$/);
if (!match) {
throw new Error($`'${durationString}'' is not a ISO 8601-formatted duration`);
}
return new Duration(
parseInt(match[2] || 0),
parseInt(match[5] || 0),
parseInt(match[7] || 0),
parseInt(match[9] || 0));
}