40 lines
2.2 KiB
JavaScript
40 lines
2.2 KiB
JavaScript
// Module ID: 3815
|
|
// Function ID: 3816
|
|
// Dependencies: [1956, 1957]
|
|
|
|
// Module 3815
|
|
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 = [/^t/i, /^s/i];
|
|
const items1 = [/(1|i)$/i, /(2|ii)$/i, /(3|iii)$/i, /(4|iv)$/i];
|
|
const items2 = [/0?1$/i, /0?2/i, /3/, /4/, /5/, /6/, /7/, /8/, /9/, /10/, /11/, /12/];
|
|
const items3 = [/^thg[ _]?0?1(?!\d)/i, /^thg[ _]?0?2/i, /^thg[ _]?0?3/i, /^thg[ _]?0?4/i, /^thg[ _]?0?5/i, /^thg[ _]?0?6/i, /^thg[ _]?0?7/i, /^thg[ _]?0?8/i, /^thg[ _]?0?9/i, /^thg[ _]?10/i, /^thg[ _]?11/i, /^thg[ _]?12/i];
|
|
const items4 = [/^tháng ?(Một|0?1(?!\d))/i, /^tháng ?(Hai|0?2)/i, /^tháng ?(Ba|0?3)/i, /^tháng ?(Tư|0?4)/i, /^tháng ?(Năm|0?5)/i, /^tháng ?(Sáu|0?6)/i, /^tháng ?(Bảy|0?7)/i, /^tháng ?(Tám|0?8)/i, /^tháng ?(Chín|0?9)/i, /^tháng ?(Mười|10)/i, /^tháng ?(Mười ?Một|11)/i, /^tháng ?(Mười ?Hai|12)/i];
|
|
const items5 = [/CN/i, /2/i, /3/i, /4/i, /5/i, /6/i, /7/i];
|
|
const items6 = [/CN/i, /2/i, /3/i, /4/i, /5/i, /6/i, /7/i];
|
|
const items7 = [/CN/i, /2/i, /3/i, /4/i, /5/i, /6/i, /7/i];
|
|
const items8 = [/(Chủ|Chúa) ?Nhật/i, /Hai/i, /Ba/i, /Tư/i, /Năm/i, /Sáu/i, /Bảy/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: { narrow: items2, abbreviated: items3, wide: items4 }, defaultParseWidth: "wide" }), day: obj.default({ matchPatterns: obj7, defaultMatchWidth: "wide", parsePatterns: { narrow: items5, short: items6, abbreviated: items7, wide: items8 }, defaultParseWidth: "wide" }), dayPeriod: obj.default({ matchPatterns: obj8, defaultMatchWidth: "wide", parsePatterns: { any: obj9 }, defaultParseWidth: "any" }) };
|
|
export default exports.default;
|