v1.0 with SW PWA enabled

This commit is contained in:
Blomios
2026-01-01 17:40:53 +01:00
parent 1c0e22aac1
commit 3c8bebb2ad
29775 changed files with 2197201 additions and 119080 deletions

View File

@ -0,0 +1,53 @@
"use strict";
exports.ISOWeekParser = void 0;
var _index = require("../../../setISOWeek.js");
var _index2 = require("../../../startOfISOWeek.js");
var _constants = require("../constants.js");
var _Parser = require("../Parser.js");
var _utils = require("../utils.js");
// ISO week of year
class ISOWeekParser extends _Parser.Parser {
priority = 100;
parse(dateString, token, match) {
switch (token) {
case "I":
return (0, _utils.parseNumericPattern)(
_constants.numericPatterns.week,
dateString,
);
case "Io":
return match.ordinalNumber(dateString, { unit: "week" });
default:
return (0, _utils.parseNDigits)(token.length, dateString);
}
}
validate(_date, value) {
return value >= 1 && value <= 53;
}
set(date, _flags, value) {
return (0, _index2.startOfISOWeek)((0, _index.setISOWeek)(date, value));
}
incompatibleTokens = [
"y",
"Y",
"u",
"q",
"Q",
"M",
"L",
"w",
"d",
"D",
"e",
"c",
"t",
"T",
];
}
exports.ISOWeekParser = ISOWeekParser;