go integration and wikipedia
This commit is contained in:
parent
47a252e339
commit
ee90335b92
7828 changed files with 1307913 additions and 20807 deletions
19
frontend/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.mjs
generated
vendored
Normal file
19
frontend/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.mjs
generated
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { Parser } from "../Parser.mjs";
|
||||
import { mapValue, parseNDigits } from "../utils.mjs";
|
||||
|
||||
export class FractionOfSecondParser extends Parser {
|
||||
priority = 30;
|
||||
|
||||
parse(dateString, token) {
|
||||
const valueCallback = (value) =>
|
||||
Math.trunc(value * Math.pow(10, -token.length + 3));
|
||||
return mapValue(parseNDigits(token.length, dateString), valueCallback);
|
||||
}
|
||||
|
||||
set(date, _flags, value) {
|
||||
date.setMilliseconds(value);
|
||||
return date;
|
||||
}
|
||||
|
||||
incompatibleTokens = ["t", "T"];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue