Initial commit
This commit is contained in:
24
node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js
generated
vendored
Normal file
24
node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
"use strict";
|
||||
exports.TimestampSecondsParser = void 0;
|
||||
var _index = require("../../../constructFrom.js");
|
||||
var _Parser = require("../Parser.js");
|
||||
|
||||
var _utils = require("../utils.js");
|
||||
|
||||
class TimestampSecondsParser extends _Parser.Parser {
|
||||
priority = 40;
|
||||
|
||||
parse(dateString) {
|
||||
return (0, _utils.parseAnyDigitsSigned)(dateString);
|
||||
}
|
||||
|
||||
set(date, _flags, value) {
|
||||
return [
|
||||
(0, _index.constructFrom)(date, value * 1000),
|
||||
{ timestampIsSet: true },
|
||||
];
|
||||
}
|
||||
|
||||
incompatibleTokens = "*";
|
||||
}
|
||||
exports.TimestampSecondsParser = TimestampSecondsParser;
|
||||
Reference in New Issue
Block a user