hugoWebsite/node_modules/date-fns/locale/bn/_lib/match/index.js

115 lines
5.2 KiB
JavaScript
Raw Normal View History

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _index = _interopRequireDefault(require("../../../_lib/buildMatchFn/index.js"));
var _index2 = _interopRequireDefault(require("../../../_lib/buildMatchPatternFn/index.js"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var matchOrdinalNumberPattern = /^(\d+)(āĻŽ|ā§Ÿ|āĻ°ā§āĻĨ|āĻˇā§āĻ |āĻļā§‡|āĻ‡|āĻ¤āĻŽ)?/i;
var parseOrdinalNumberPattern = /\d+/i;
var matchEraPatterns = {
narrow: /^(āĻ–ā§āĻ°āĻŋāĻƒāĻĒā§‚āĻƒ|āĻ–ā§āĻ°āĻŋāĻƒ)/i,
abbreviated: /^(āĻ–ā§āĻ°āĻŋāĻƒāĻĒā§‚āĻ°ā§āĻŦ|āĻ–ā§āĻ°āĻŋāĻƒ)/i,
wide: /^(āĻ–ā§āĻ°āĻŋāĻ¸ā§āĻŸāĻĒā§‚āĻ°ā§āĻŦ|āĻ–ā§āĻ°āĻŋāĻ¸ā§āĻŸāĻžāĻŦā§āĻĻ)/i
};
var parseEraPatterns = {
narrow: [/^āĻ–ā§āĻ°āĻŋāĻƒāĻĒā§‚āĻƒ/i, /^āĻ–ā§āĻ°āĻŋāĻƒ/i],
abbreviated: [/^āĻ–ā§āĻ°āĻŋāĻƒāĻĒā§‚āĻ°ā§āĻŦ/i, /^āĻ–ā§āĻ°āĻŋāĻƒ/i],
wide: [/^āĻ–ā§āĻ°āĻŋāĻ¸ā§āĻŸāĻĒā§‚āĻ°ā§āĻŦ/i, /^āĻ–ā§āĻ°āĻŋāĻ¸ā§āĻŸāĻžāĻŦā§āĻĻ/i]
};
var matchQuarterPatterns = {
narrow: /^[ā§§ā§¨ā§Šā§Ē]/i,
abbreviated: /^[ā§§ā§¨ā§Šā§Ē]āĻ¤ā§āĻ°ā§ˆ/i,
wide: /^[ā§§ā§¨ā§Šā§Ē](āĻŽ|ā§Ÿ|āĻ°ā§āĻĨ)? āĻ¤ā§āĻ°ā§ˆāĻŽāĻžāĻ¸āĻŋāĻ•/i
};
var parseQuarterPatterns = {
any: [/ā§§/i, /ā§¨/i, /ā§Š/i, /ā§Ē/i]
};
var matchMonthPatterns = {
narrow: /^(āĻœāĻžāĻ¨ā§|āĻĢā§‡āĻŦā§āĻ°ā§|āĻŽāĻžāĻ°ā§āĻš|āĻāĻĒā§āĻ°āĻŋāĻ˛|āĻŽā§‡|āĻœā§āĻ¨|āĻœā§āĻ˛āĻžāĻ‡|āĻ†āĻ—āĻ¸ā§āĻŸ|āĻ¸ā§‡āĻĒā§āĻŸ|āĻ…āĻ•ā§āĻŸā§‹|āĻ¨āĻ­ā§‡|āĻĄāĻŋāĻ¸ā§‡)/i,
abbreviated: /^(āĻœāĻžāĻ¨ā§|āĻĢā§‡āĻŦā§āĻ°ā§|āĻŽāĻžāĻ°ā§āĻš|āĻāĻĒā§āĻ°āĻŋāĻ˛|āĻŽā§‡|āĻœā§āĻ¨|āĻœā§āĻ˛āĻžāĻ‡|āĻ†āĻ—āĻ¸ā§āĻŸ|āĻ¸ā§‡āĻĒā§āĻŸ|āĻ…āĻ•ā§āĻŸā§‹|āĻ¨āĻ­ā§‡|āĻĄāĻŋāĻ¸ā§‡)/i,
wide: /^(āĻœāĻžāĻ¨ā§ā§ŸāĻžāĻ°āĻŋ|āĻĢā§‡āĻŦā§āĻ°ā§ā§ŸāĻžāĻ°āĻŋ|āĻŽāĻžāĻ°ā§āĻš|āĻāĻĒā§āĻ°āĻŋāĻ˛|āĻŽā§‡|āĻœā§āĻ¨|āĻœā§āĻ˛āĻžāĻ‡|āĻ†āĻ—āĻ¸ā§āĻŸ|āĻ¸ā§‡āĻĒā§āĻŸā§‡āĻŽā§āĻŦāĻ°|āĻ…āĻ•ā§āĻŸā§‹āĻŦāĻ°|āĻ¨āĻ­ā§‡āĻŽā§āĻŦāĻ°|āĻĄāĻŋāĻ¸ā§‡āĻŽā§āĻŦāĻ°)/i
};
var parseMonthPatterns = {
any: [/^āĻœāĻžāĻ¨ā§/i, /^āĻĢā§‡āĻŦā§āĻ°ā§/i, /^āĻŽāĻžāĻ°ā§āĻš/i, /^āĻāĻĒā§āĻ°āĻŋāĻ˛/i, /^āĻŽā§‡/i, /^āĻœā§āĻ¨/i, /^āĻœā§āĻ˛āĻžāĻ‡/i, /^āĻ†āĻ—āĻ¸ā§āĻŸ/i, /^āĻ¸ā§‡āĻĒā§āĻŸ/i, /^āĻ…āĻ•ā§āĻŸā§‹/i, /^āĻ¨āĻ­ā§‡/i, /^āĻĄāĻŋāĻ¸ā§‡/i]
};
var matchDayPatterns = {
narrow: /^(āĻ°|āĻ¸ā§‹|āĻŽ|āĻŦā§|āĻŦā§ƒ|āĻļā§|āĻļ)+/i,
short: /^(āĻ°āĻŦāĻŋ|āĻ¸ā§‹āĻŽ|āĻŽāĻ™ā§āĻ—āĻ˛|āĻŦā§āĻ§|āĻŦā§ƒāĻš|āĻļā§āĻ•ā§āĻ°|āĻļāĻ¨āĻŋ)+/i,
abbreviated: /^(āĻ°āĻŦāĻŋ|āĻ¸ā§‹āĻŽ|āĻŽāĻ™ā§āĻ—āĻ˛|āĻŦā§āĻ§|āĻŦā§ƒāĻš|āĻļā§āĻ•ā§āĻ°|āĻļāĻ¨āĻŋ)+/i,
wide: /^(āĻ°āĻŦāĻŋāĻŦāĻžāĻ°|āĻ¸ā§‹āĻŽāĻŦāĻžāĻ°|āĻŽāĻ™ā§āĻ—āĻ˛āĻŦāĻžāĻ°|āĻŦā§āĻ§āĻŦāĻžāĻ°|āĻŦā§ƒāĻšāĻ¸ā§āĻĒāĻ¤āĻŋāĻŦāĻžāĻ° |āĻļā§āĻ•ā§āĻ°āĻŦāĻžāĻ°|āĻļāĻ¨āĻŋāĻŦāĻžāĻ°)+/i
};
var parseDayPatterns = {
narrow: [/^āĻ°/i, /^āĻ¸ā§‹/i, /^āĻŽ/i, /^āĻŦā§/i, /^āĻŦā§ƒ/i, /^āĻļā§/i, /^āĻļ/i],
short: [/^āĻ°āĻŦāĻŋ/i, /^āĻ¸ā§‹āĻŽ/i, /^āĻŽāĻ™ā§āĻ—āĻ˛/i, /^āĻŦā§āĻ§/i, /^āĻŦā§ƒāĻš/i, /^āĻļā§āĻ•ā§āĻ°/i, /^āĻļāĻ¨āĻŋ/i],
abbreviated: [/^āĻ°āĻŦāĻŋ/i, /^āĻ¸ā§‹āĻŽ/i, /^āĻŽāĻ™ā§āĻ—āĻ˛/i, /^āĻŦā§āĻ§/i, /^āĻŦā§ƒāĻš/i, /^āĻļā§āĻ•ā§āĻ°/i, /^āĻļāĻ¨āĻŋ/i],
wide: [/^āĻ°āĻŦāĻŋāĻŦāĻžāĻ°/i, /^āĻ¸ā§‹āĻŽāĻŦāĻžāĻ°/i, /^āĻŽāĻ™ā§āĻ—āĻ˛āĻŦāĻžāĻ°/i, /^āĻŦā§āĻ§āĻŦāĻžāĻ°/i, /^āĻŦā§ƒāĻšāĻ¸ā§āĻĒāĻ¤āĻŋāĻŦāĻžāĻ° /i, /^āĻļā§āĻ•ā§āĻ°āĻŦāĻžāĻ°/i, /^āĻļāĻ¨āĻŋāĻŦāĻžāĻ°/i]
};
var matchDayPeriodPatterns = {
narrow: /^(āĻĒā§‚|āĻ…āĻĒ|āĻŽāĻ§ā§āĻ¯āĻ°āĻžāĻ¤|āĻŽāĻ§ā§āĻ¯āĻžāĻšā§āĻ¨|āĻ¸āĻ•āĻžāĻ˛|āĻŦāĻŋāĻ•āĻžāĻ˛|āĻ¸āĻ¨ā§āĻ§ā§āĻ¯āĻž|āĻ°āĻžāĻ¤)/i,
abbreviated: /^(āĻĒā§‚āĻ°ā§āĻŦāĻžāĻšā§āĻ¨|āĻ…āĻĒāĻ°āĻžāĻšā§āĻ¨|āĻŽāĻ§ā§āĻ¯āĻ°āĻžāĻ¤|āĻŽāĻ§ā§āĻ¯āĻžāĻšā§āĻ¨|āĻ¸āĻ•āĻžāĻ˛|āĻŦāĻŋāĻ•āĻžāĻ˛|āĻ¸āĻ¨ā§āĻ§ā§āĻ¯āĻž|āĻ°āĻžāĻ¤)/i,
wide: /^(āĻĒā§‚āĻ°ā§āĻŦāĻžāĻšā§āĻ¨|āĻ…āĻĒāĻ°āĻžāĻšā§āĻ¨|āĻŽāĻ§ā§āĻ¯āĻ°āĻžāĻ¤|āĻŽāĻ§ā§āĻ¯āĻžāĻšā§āĻ¨|āĻ¸āĻ•āĻžāĻ˛|āĻŦāĻŋāĻ•āĻžāĻ˛|āĻ¸āĻ¨ā§āĻ§ā§āĻ¯āĻž|āĻ°āĻžāĻ¤)/i
};
var parseDayPeriodPatterns = {
any: {
am: /^āĻĒā§‚/i,
pm: /^āĻ…āĻĒ/i,
midnight: /^āĻŽāĻ§ā§āĻ¯āĻ°āĻžāĻ¤/i,
noon: /^āĻŽāĻ§ā§āĻ¯āĻžāĻšā§āĻ¨/i,
morning: /āĻ¸āĻ•āĻžāĻ˛/i,
afternoon: /āĻŦāĻŋāĻ•āĻžāĻ˛/i,
evening: /āĻ¸āĻ¨ā§āĻ§ā§āĻ¯āĻž/i,
night: /āĻ°āĻžāĻ¤/i
}
};
var match = {
ordinalNumber: (0, _index2.default)({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: function valueCallback(value) {
return parseInt(value, 10);
}
}),
era: (0, _index.default)({
matchPatterns: matchEraPatterns,
defaultMatchWidth: 'wide',
parsePatterns: parseEraPatterns,
defaultParseWidth: 'wide'
}),
quarter: (0, _index.default)({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: 'wide',
parsePatterns: parseQuarterPatterns,
defaultParseWidth: 'any',
valueCallback: function valueCallback(index) {
return index + 1;
}
}),
month: (0, _index.default)({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: 'wide',
parsePatterns: parseMonthPatterns,
defaultParseWidth: 'any'
}),
day: (0, _index.default)({
matchPatterns: matchDayPatterns,
defaultMatchWidth: 'wide',
parsePatterns: parseDayPatterns,
defaultParseWidth: 'wide'
}),
dayPeriod: (0, _index.default)({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: 'wide',
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: 'any'
})
};
var _default = match;
exports.default = _default;
module.exports = exports.default;