decord/source/module_3403.js

39 lines
1.8 KiB
JavaScript
Raw Normal View History

2026-08-03 11:20:01 +00:00
// Module ID: 3403
// Function ID: 3404
2026-08-04 08:36:32 +00:00
// Dependencies: [1957, 1956]
2026-07-29 08:29:29 +00:00
2026-08-03 11:20:01 +00:00
// Module 3403
2026-07-29 08:29:29 +00:00
import buildMatchPatternFn from "buildMatchPatternFn";
2026-08-04 08:36:32 +00:00
import buildMatchFn from "buildMatchFn";
2026-07-29 08:29:29 +00:00
2026-08-04 08:36:32 +00:00
if (!buildMatchPatternFn) {
2026-07-29 08:29:29 +00:00
let obj = { default: null };
2026-08-04 08:36:32 +00:00
obj[0] = buildMatchPatternFn;
2026-07-29 08:29:29 +00:00
} else {
2026-08-04 08:36:32 +00:00
obj = buildMatchPatternFn;
2026-07-29 08:29:29 +00:00
}
2026-08-04 08:36:32 +00:00
if (!buildMatchFn) {
2026-07-29 08:29:29 +00:00
obj = { default: null };
2026-08-04 08:36:32 +00:00
obj[0] = buildMatchFn;
2026-07-29 08:29:29 +00:00
let obj2 = obj;
} else {
2026-08-04 08:36:32 +00:00
obj2 = buildMatchFn;
2026-07-29 08:29:29 +00:00
}
obj2 = {
2026-08-03 11:20:01 +00:00
matchPattern: /^(\d+)(º)?/i,
2026-07-29 08:29:29 +00:00
parsePattern: /\d+/i,
valueCallback(joined) {
return parseInt(joined, 10);
}
};
2026-08-04 08:36:32 +00:00
const items = [/^ac/i, /^dc/i];
const items1 = [/^(antes de cristo|antes de la era com[uú]n)/i, /^(despu[eé]s de cristo|era com[uú]n)/i];
const items2 = [/1/i, /2/i, /3/i, /4/i];
const items3 = [/^e/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i];
const items4 = [/^en/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i];
const items5 = [/^d/i, /^l/i, /^m/i, /^m/i, /^j/i, /^v/i, /^s/i];
const items6 = [/^do/i, /^lu/i, /^ma/i, /^mi/i, /^ju/i, /^vi/i, /^sa/i];
2026-07-29 08:29:29 +00:00
2026-08-04 08:36:32 +00:00
export default { ordinalNumber: obj.default(obj2), era: obj2.default({ matchPatterns: obj3, defaultMatchWidth: "wide", parsePatterns: { any: items, wide: items1 }, defaultParseWidth: "any" }), quarter: obj2.default(obj4), month: obj2.default({ matchPatterns: obj6, defaultMatchWidth: "wide", parsePatterns: { narrow: items3, any: items4 }, defaultParseWidth: "any" }), day: obj2.default({ matchPatterns: obj7, defaultMatchWidth: "wide", parsePatterns: { narrow: items5, any: items6 }, defaultParseWidth: "any" }), dayPeriod: obj2.default({ matchPatterns: obj8, defaultMatchWidth: "any", parsePatterns: { any: obj9 }, defaultParseWidth: "any" }) };
2026-07-29 08:29:29 +00:00
export default exports.default;