datetimes
Version:
Extend class of Date
13 lines (11 loc) • 388 B
JavaScript
function MinuteExpression(dateRx, date, language) {
Expresion.call(this, dateRx, date, language);
this.oneDigit = null;
this.twoDigit = twoDigit;
this.threeDigit = null;
this.fourDigit = null;
this.otherDigit = null;
function twoDigit(input) {
return input.replace(this.dateRx, this.date.getMinutes().toString().padStart(2, '0'));
}
}