Initial commit

This commit is contained in:
Ammaar Reshi
2025-01-04 14:06:53 +00:00
parent 7082408604
commit d6025af146
23760 changed files with 3299690 additions and 0 deletions

View File

@ -0,0 +1,26 @@
"use strict";
exports.FractionOfSecondParser = void 0;
var _Parser = require("../Parser.js");
var _utils = require("../utils.js");
class FractionOfSecondParser extends _Parser.Parser {
priority = 30;
parse(dateString, token) {
const valueCallback = (value) =>
Math.trunc(value * Math.pow(10, -token.length + 3));
return (0, _utils.mapValue)(
(0, _utils.parseNDigits)(token.length, dateString),
valueCallback,
);
}
set(date, _flags, value) {
date.setMilliseconds(value);
return date;
}
incompatibleTokens = ["t", "T"];
}
exports.FractionOfSecondParser = FractionOfSecondParser;