24 lines
1.4 KiB
JavaScript
24 lines
1.4 KiB
JavaScript
// Module ID: 3655
|
||
// Function ID: 27972
|
||
// Dependencies: [1932, 1933]
|
||
|
||
// Module 3655
|
||
import result from "result";
|
||
|
||
obj = { ordinalNumber: require("result")(obj), era: result.default({ matchPatterns: obj1, defaultMatchWidth: "wide", parsePatterns: { any: items }, defaultParseWidth: "any" }), quarter: result.default(obj2), month: result.default({ matchPatterns: obj4, defaultMatchWidth: "wide", parsePatterns: { narrow: items2, any: items3 }, defaultParseWidth: "any" }), day: result.default({ matchPatterns: obj5, defaultMatchWidth: "wide", parsePatterns: { narrow: items4, any: items5 }, defaultParseWidth: "any" }), dayPeriod: result.default({ matchPatterns: obj6, defaultMatchWidth: "wide", parsePatterns: { any: obj7 }, defaultParseWidth: "any" }) };
|
||
obj = {
|
||
matchPattern: /^(\d+)(-?(е|й|є|а|я))?/i,
|
||
parsePattern: /\d+/i,
|
||
valueCallback(replaced) {
|
||
return parseInt(replaced, 10);
|
||
}
|
||
};
|
||
items = [/^д/i, /^н/i];
|
||
const items1 = [/1/i, /2/i, /3/i, /4/i];
|
||
items2 = [/^с/i, /^л/i, /^б/i, /^к/i, /^т/i, /^ч/i, /^л/i, /^с/i, /^в/i, /^ж/i, /^л/i, /^г/i];
|
||
items3 = [/^сі/i, /^лю/i, /^б/i, /^к/i, /^т/i, /^ч/i, /^лип/i, /^се/i, /^в/i, /^ж/i, /^лис/i, /^г/i];
|
||
items4 = [/^н/i, /^п/i, /^в/i, /^с/i, /^ч/i, /^п/i, /^с/i];
|
||
items5 = [/^н/i, /^п[он]/i, /^в/i, /^с[ер]/i, /^ч/i, /^п\W*?[ят]/i, /^с[уб]/i];
|
||
|
||
export default obj;
|
||
export default exports.default;
|