You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

170 lines
4.1 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _index = _interopRequireDefault(require("../../../_lib/buildLocalizeFn/index.js"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var eraValues = {
narrow: ['B', 'A'],
abbreviated: ['BC', 'AD'],
wide: ["Hz. İsa'dan öncə", 'Anno Domini']
};
var quarterValues = {
narrow: ['1', '2', '3', '4'],
abbreviated: ['K1', 'K2', 'K3', 'K4'],
wide: ['1ci kvartal', '2ci kvartal', '3cü kvartal', '4cü kvartal'] // Note: in English, the names of days of the week and months are capitalized.
// If you are making a new locale based on this one, check if the same is true for the language you're working on.
// Generally, formatted dates should look like they are in the middle of a sentence,
// e.g. in Spanish language the weekdays and months should be in the lowercase.
};
var monthValues = {
narrow: ['Y', 'F', 'M', 'A', 'M', 'I', 'I', 'A', 'S', 'O', 'N', 'D'],
abbreviated: ['Yan', 'Fev', 'Mar', 'Apr', 'May', 'İyun', 'İyul', 'Avq', 'Sen', 'Okt', 'Noy', 'Dek'],
wide: ['Yanvar', 'Fevral', 'Mart', 'Aprel', 'May', 'İyun', 'İyul', 'Avqust', 'Sentyabr', 'Oktyabr', 'Noyabr', 'Dekabr']
};
var dayValues = {
narrow: ['B.', 'B.e', 'Ç.a', 'Ç.', 'C.a', 'C.', 'Ş.'],
short: ['B.', 'B.e', 'Ç.a', 'Ç.', 'C.a', 'C.', 'Ş.'],
abbreviated: ['Baz', 'Baz.e', 'Çər.a', 'Çər', 'Cüm.a', 'Cüm', 'Şə'],
wide: ['Bazar', 'Bazar ertəsi', 'Çərşənbə axşamı', 'Çərşənbə', 'Cümə axşamı', 'Cümə', 'Şənbə']
};
var dayPeriodValues = {
narrow: {
am: 'am',
pm: 'pm',
midnight: 'gecəyarı',
noon: 'gün',
morning: 'səhər',
afternoon: 'gündüz',
evening: 'axşam',
night: 'gecə'
},
abbreviated: {
am: 'AM',
pm: 'PM',
midnight: 'gecəyarı',
noon: 'gün',
morning: 'səhər',
afternoon: 'gündüz',
evening: 'axşam',
night: 'gecə'
},
wide: {
am: 'a.m.',
pm: 'p.m.',
midnight: 'gecəyarı',
noon: 'gün',
morning: 'səhər',
afternoon: 'gündüz',
evening: 'axşam',
night: 'gecə'
}
};
var formattingDayPeriodValues = {
narrow: {
am: 'a',
pm: 'p',
midnight: 'gecəyarı',
noon: 'gün',
morning: 'səhər',
afternoon: 'gündüz',
evening: 'axşam',
night: 'gecə'
},
abbreviated: {
am: 'AM',
pm: 'PM',
midnight: 'gecəyarı',
noon: 'gün',
morning: 'səhər',
afternoon: 'gündüz',
evening: 'axşam',
night: 'gecə'
},
wide: {
am: 'a.m.',
pm: 'p.m.',
midnight: 'gecəyarı',
noon: 'gün',
morning: 'səhər',
afternoon: 'gündüz',
evening: 'axşam',
night: 'gecə'
}
};
var suffixes = {
1: '-inci',
5: '-inci',
8: '-inci',
70: '-inci',
80: '-inci',
2: '-nci',
7: '-nci',
20: '-nci',
50: '-nci',
3: '-üncü',
4: '-üncü',
100: '-üncü',
6: '-ncı',
9: '-uncu',
10: '-uncu',
30: '-uncu',
60: '-ıncı',
90: '-ıncı'
};
function getSuffix(number) {
if (number === 0) {
// special case for zero
return number + '-ıncı';
}
var a = number % 10,
b = number % 100 - a,
c = number >= 100 ? 100 : null;
return suffixes[a] || suffixes[b] || suffixes[c];
}
function ordinalNumber(dirtyNumber, _dirtyOptions) {
var number = Number(dirtyNumber);
var suffix = getSuffix(number);
return number + suffix;
}
var localize = {
ordinalNumber: ordinalNumber,
era: (0, _index.default)({
values: eraValues,
defaultWidth: 'wide'
}),
quarter: (0, _index.default)({
values: quarterValues,
defaultWidth: 'wide',
argumentCallback: function (quarter) {
return Number(quarter) - 1;
}
}),
month: (0, _index.default)({
values: monthValues,
defaultWidth: 'wide'
}),
day: (0, _index.default)({
values: dayValues,
defaultWidth: 'wide'
}),
dayPeriod: (0, _index.default)({
values: dayPeriodValues,
defaultWidth: 'wide',
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: 'wide'
})
};
var _default = localize;
exports.default = _default;
module.exports = exports.default;