36 lines
1.6 KiB
JavaScript
36 lines
1.6 KiB
JavaScript
// Module ID: 3387
|
||
// Function ID: 3388
|
||
// Dependencies: [1985, 1986]
|
||
|
||
// Module 3387
|
||
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 = {
|
||
matchPattern: /^(\d+)(-?[врмт][аи]|-?т?(ен|на)|-?(ев|ева))?/i,
|
||
parsePattern: /\d+/i,
|
||
valueCallback(joined) {
|
||
return parseInt(joined, 10);
|
||
}
|
||
};
|
||
const items = [/^п/i, /^н/i];
|
||
const items1 = [/1/i, /2/i, /3/i, /4/i];
|
||
const items2 = [/^я/i, /^ф/i, /^мар/i, /^ап/i, /^май/i, /^юн/i, /^юл/i, /^ав/i, /^се/i, /^окт/i, /^но/i, /^де/i];
|
||
const items3 = [/^н/i, /^п/i, /^в/i, /^с/i, /^ч/i, /^п/i, /^с/i];
|
||
const items4 = [/^н[ед]/i, /^п[он]/i, /^вт/i, /^ср/i, /^ч[ет]/i, /^п[ет]/i, /^с[ъб]/i];
|
||
|
||
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: { narrow: items3, any: items4 }, defaultParseWidth: "any" }), dayPeriod: obj.default({ matchPatterns: obj8, defaultMatchWidth: "any", parsePatterns: { any: obj9 }, defaultParseWidth: "any" }) };
|
||
export default exports.default;
|