import { __require as requireDatepart } from './datepart.mjs';

var milliseconds;
var hasRequiredMilliseconds;
function requireMilliseconds() {
  if (hasRequiredMilliseconds) return milliseconds;
  hasRequiredMilliseconds = 1;
  const DatePart = requireDatepart();
  class Milliseconds extends DatePart {
    constructor(opts = {}) {
      super(opts);
    }
    up() {
      this.date.setMilliseconds(this.date.getMilliseconds() + 1);
    }
    down() {
      this.date.setMilliseconds(this.date.getMilliseconds() - 1);
    }
    setTo(val) {
      this.date.setMilliseconds(parseInt(val.substr(-this.token.length)));
    }
    toString() {
      return String(this.date.getMilliseconds()).padStart(4, '0').substr(0, this.token.length);
    }
  }
  milliseconds = Milliseconds;
  return milliseconds;
}

export { requireMilliseconds as __require };
