decord/source/module_3563.js

38 lines
1.7 KiB
JavaScript
Raw Normal View History

2026-08-12 06:57:52 +00:00
// Module ID: 3563
// Function ID: 3564
2026-08-11 06:20:06 +00:00
// Dependencies: [2004, 2005]
2026-07-29 08:29:29 +00:00
2026-08-12 06:57:52 +00:00
// Module 3563
2026-07-29 08:29:29 +00:00
import buildMatchFn from "buildMatchFn";
import buildMatchPatternFn from "buildMatchPatternFn";
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 = {
2026-08-05 07:35:12 +00:00
matchPattern: /^(\d+)(-?(е|я|й|ое|ье|ая|ья|ый|ой|ий|ый))?/i,
2026-07-29 08:29:29 +00:00
parsePattern: /\d+/i,
valueCallback(joined) {
return parseInt(joined, 10);
}
};
2026-08-05 07:35:12 +00:00
const items = [/^д/i, /^н/i];
2026-07-29 08:29:29 +00:00
const items1 = [/1/i, /2/i, /3/i, /4/i];
2026-08-05 07:35:12 +00:00
const items2 = [/^я/i, /^ф/i, /^м/i, /^а/i, /^м/i, /^и/i, /^и/i, /^а/i, /^с/i, /^о/i, /^н/i, /^я/i];
const items3 = [/^я/i, /^ф/i, /^мар/i, /^ап/i, /^ма[йя]/i, /^июн/i, /^июл/i, /^ав/i, /^с/i, /^о/i, /^н/i, /^д/i];
const items4 = [/^в/i, /^п/i, /^в/i, /^с/i, /^ч/i, /^п/i, /^с/i];
const items5 = [/^в[ос]/i, /^п[он]/i, /^в/i, /^ср/i, /^ч/i, /^п[ят]/i, /^с[уб]/i];
2026-07-29 08:29:29 +00:00
2026-08-05 07:35:12 +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: { narrow: items2, any: items3 }, defaultParseWidth: "any" }), day: obj.default({ matchPatterns: obj7, defaultMatchWidth: "wide", parsePatterns: { narrow: items4, any: items5 }, defaultParseWidth: "any" }), dayPeriod: obj.default({ matchPatterns: obj8, defaultMatchWidth: "wide", parsePatterns: { any: obj9 }, defaultParseWidth: "any" }) };
2026-07-29 08:29:29 +00:00
export default exports.default;