decord/source/module_3353.js

36 lines
1.4 KiB
JavaScript
Raw Normal View History

2026-07-31 08:44:05 +00:00
// Module ID: 3353
// Function ID: 3354
2026-07-29 08:29:29 +00:00
// Dependencies: [1956, 1957]
2026-07-20 16:05:17 +00:00
2026-07-31 08:44:05 +00:00
// Module 3353
2026-07-29 08:29:29 +00:00
import buildMatchFn from "buildMatchFn";
import buildMatchPatternFn from "buildMatchPatternFn";
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
if (!buildMatchFn) {
let obj = { default: null };
obj[0] = buildMatchFn;
} else {
obj = buildMatchFn;
}
if (!buildMatchPatternFn) {
obj = { default: null };
obj[0] = buildMatchPatternFn;
let obj2 = obj;
} else {
obj2 = buildMatchPatternFn;
}
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 = [/^(bc|기원전)/i, /^(ad|서기)/i];
2026-07-25 08:10:48 +00:00
const items1 = [/1/i, /2/i, /3/i, /4/i];
2026-07-29 08:29:29 +00:00
const items2 = [/^1월?$/, /^2/, /^3/, /^4/, /^5/, /^6/, /^7/, /^8/, /^9/, /^10/, /^11/, /^12/];
const items3 = [/^일/, /^월/, /^화/, /^수/, /^목/, /^금/, /^토/];
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
export default { ordinalNumber: obj2.default(obj2), era: obj.default({ matchPatterns: obj3, defaultMatchWidth: "wide", parsePatterns: { any: items }, defaultParseWidth: "any" }), quarter: obj.default(obj4), month: obj.default({ matchPatterns: obj6, defaultMatchWidth: "wide", parsePatterns: { any: items2 }, defaultParseWidth: "any" }), day: obj.default({ matchPatterns: obj7, defaultMatchWidth: "wide", parsePatterns: { any: items3 }, defaultParseWidth: "any" }), dayPeriod: obj.default({ matchPatterns: obj8, defaultMatchWidth: "any", parsePatterns: { any: obj9 }, defaultParseWidth: "any" }) };
2026-07-20 16:05:17 +00:00
export default exports.default;