decord/source/module_3347.js

37 lines
1.6 KiB
JavaScript
Raw Normal View History

2026-07-31 08:44:05 +00:00
// Module ID: 3347
// Function ID: 3348
2026-07-29 08:29:29 +00:00
// Dependencies: [1957, 1956]
2026-07-20 16:05:17 +00:00
2026-07-31 08:44:05 +00:00
// Module 3347
2026-07-29 08:29:29 +00:00
import buildMatchPatternFn from "buildMatchPatternFn";
import buildMatchFn from "buildMatchFn";
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
if (!buildMatchPatternFn) {
let obj = { default: null };
obj[0] = buildMatchPatternFn;
} else {
obj = buildMatchPatternFn;
}
if (!buildMatchFn) {
obj = { default: null };
obj[0] = buildMatchFn;
let obj2 = obj;
} else {
obj2 = buildMatchFn;
}
obj2 = {
matchPattern: /^第?\d+(年|四半期|月|週|日|時|分|秒)?/i,
2026-07-25 08:10:48 +00:00
parsePattern: /\d+/i,
2026-07-29 08:29:29 +00:00
valueCallback(joined) {
return parseInt(joined, 10);
2026-07-25 08:10:48 +00:00
}
};
2026-07-29 08:29:29 +00:00
const items = [/^B/i, /^A/i];
const items1 = [/^(紀元前)/i, /^(西暦|紀元後)/i];
const items2 = [/(1|一|1)/i, /(2|二|2)/i, /(3|三|3)/i, /(4|四|4)/i];
const items3 = [/^1\D/, /^2/, /^3/, /^4/, /^5/, /^6/, /^7/, /^8/, /^9/, /^10/, /^11/, /^12/];
const items4 = [/^日/, /^月/, /^火/, /^水/, /^木/, /^金/, /^土/];
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
export default { ordinalNumber: obj.default(obj2), era: obj2.default({ matchPatterns: obj3, defaultMatchWidth: "wide", parsePatterns: { narrow: items, any: items1 }, defaultParseWidth: "any" }), quarter: obj2.default(obj4), month: obj2.default({ matchPatterns: obj6, defaultMatchWidth: "wide", parsePatterns: { any: items3 }, defaultParseWidth: "any" }), day: obj2.default({ matchPatterns: obj7, defaultMatchWidth: "wide", parsePatterns: { any: items4 }, defaultParseWidth: "any" }), dayPeriod: obj2.default({ matchPatterns: obj8, defaultMatchWidth: "any", parsePatterns: { any: obj9 }, defaultParseWidth: "any" }) };
2026-07-20 16:05:17 +00:00
export default exports.default;