TimestampSecondsParser.cjs 569 B

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