TimestampMillisecondsParser.cjs 563 B

123456789101112131415161718192021
  1. "use strict";
  2. exports.TimestampMillisecondsParser = void 0;
  3. var _index = require("../../../constructFrom.cjs");
  4. var _Parser = require("../Parser.cjs");
  5. var _utils = require("../utils.cjs");
  6. class TimestampMillisecondsParser extends _Parser.Parser {
  7. priority = 20;
  8. parse(dateString) {
  9. return (0, _utils.parseAnyDigitsSigned)(dateString);
  10. }
  11. set(date, _flags, value) {
  12. return [(0, _index.constructFrom)(date, value), { timestampIsSet: true }];
  13. }
  14. incompatibleTokens = "*";
  15. }
  16. exports.TimestampMillisecondsParser = TimestampMillisecondsParser;