UNPKG

datetimes

Version:

Extend class of Date

13 lines (11 loc) 402 B
function MillisecondExpression(dateRx, date, language) { Expresion.call(this, dateRx, date, language); this.oneDigit = null; this.twoDigit = null; this.threeDigit = threeDigit; this.fourDigit = null; this.otherDigit = null; function threeDigit(input) { return input.replace(this.dateRx, this.date.getMilliseconds().toString().padStart(3, '0')); } }