- ✅ Ticket 1.1: Estructura Clean Architecture en backend - ✅ Ticket 1.2: Schemas Zod compartidos - ✅ Ticket 1.3: Refactorización drugs.ts (1362 → 8 archivos modulares) - ✅ Ticket 1.4: Refactorización procedures.ts (3583 → 6 archivos modulares) - ✅ Ticket 1.5: Eliminación de duplicidades (~50 líneas) Cambios principales: - Creada estructura Clean Architecture en backend/src/ - Schemas Zod compartidos en backend/src/shared/schemas/ - Refactorización modular de drugs y procedures - Utilidades genéricas en src/utils/ (filter, validation) - Eliminados scripts obsoletos y documentación antigua - Corregidos errores: QueryClient, import test-error-handling - Build verificado y funcionando correctamente
47 lines
979 B
JavaScript
47 lines
979 B
JavaScript
"use strict";
|
|
exports.ISOWeekYearParser = void 0;
|
|
var _index = require("../../../startOfISOWeek.js");
|
|
var _index2 = require("../../../constructFrom.js");
|
|
var _Parser = require("../Parser.js");
|
|
|
|
var _utils = require("../utils.js");
|
|
|
|
// ISO week-numbering year
|
|
class ISOWeekYearParser extends _Parser.Parser {
|
|
priority = 130;
|
|
|
|
parse(dateString, token) {
|
|
if (token === "R") {
|
|
return (0, _utils.parseNDigitsSigned)(4, dateString);
|
|
}
|
|
|
|
return (0, _utils.parseNDigitsSigned)(token.length, dateString);
|
|
}
|
|
|
|
set(date, _flags, value) {
|
|
const firstWeekOfYear = (0, _index2.constructFrom)(date, 0);
|
|
firstWeekOfYear.setFullYear(value, 0, 4);
|
|
firstWeekOfYear.setHours(0, 0, 0, 0);
|
|
return (0, _index.startOfISOWeek)(firstWeekOfYear);
|
|
}
|
|
|
|
incompatibleTokens = [
|
|
"G",
|
|
"y",
|
|
"Y",
|
|
"u",
|
|
"Q",
|
|
"q",
|
|
"M",
|
|
"L",
|
|
"w",
|
|
"d",
|
|
"D",
|
|
"e",
|
|
"c",
|
|
"t",
|
|
"T",
|
|
];
|
|
}
|
|
exports.ISOWeekYearParser = ISOWeekYearParser;
|