hugoWebsite/node_modules/date-fns/locale/ms/_lib/localize/index.js

139 lines
3.7 KiB
JavaScript
Raw Normal View History

2022-10-29 00:20:35 +02:00
"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 }; }
// Most data for localization are taken from this page
// https://www.unicode.org/cldr/charts/32/summary/ms.html
var eraValues = {
narrow: ['SM', 'M'],
abbreviated: ['SM', 'M'],
wide: ['Sebelum Masihi', 'Masihi']
};
var quarterValues = {
narrow: ['1', '2', '3', '4'],
abbreviated: ['S1', 'S2', 'S3', 'S4'],
wide: ['Suku pertama', 'Suku kedua', 'Suku ketiga', 'Suku keempat']
}; // Note: in Malay, 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: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'O', 'S', 'O', 'N', 'D'],
abbreviated: ['Jan', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Jul', 'Ogo', 'Sep', 'Okt', 'Nov', 'Dis'],
wide: ['Januari', 'Februari', 'Mac', 'April', 'Mei', 'Jun', 'Julai', 'Ogos', 'September', 'Oktober', 'November', 'Disember']
};
var dayValues = {
narrow: ['A', 'I', 'S', 'R', 'K', 'J', 'S'],
short: ['Ahd', 'Isn', 'Sel', 'Rab', 'Kha', 'Jum', 'Sab'],
abbreviated: ['Ahd', 'Isn', 'Sel', 'Rab', 'Kha', 'Jum', 'Sab'],
wide: ['Ahad', 'Isnin', 'Selasa', 'Rabu', 'Khamis', 'Jumaat', 'Sabtu']
};
var dayPeriodValues = {
narrow: {
am: 'am',
pm: 'pm',
midnight: 'tgh malam',
noon: 'tgh hari',
morning: 'pagi',
afternoon: 'tengah hari',
evening: 'petang',
night: 'malam'
},
abbreviated: {
am: 'AM',
pm: 'PM',
midnight: 'tengah malam',
noon: 'tengah hari',
morning: 'pagi',
afternoon: 'tengah hari',
evening: 'petang',
night: 'malam'
},
wide: {
am: 'a.m.',
pm: 'p.m.',
midnight: 'tengah malam',
noon: 'tengah hari',
morning: 'pagi',
afternoon: 'tengah hari',
evening: 'petang',
night: 'malam'
}
};
var formattingDayPeriodValues = {
narrow: {
am: 'am',
pm: 'pm',
midnight: 'tengah malam',
noon: 'tengah hari',
morning: 'pagi',
afternoon: 'tengah hari',
evening: 'petang',
night: 'malam'
},
abbreviated: {
am: 'AM',
pm: 'PM',
midnight: 'tengah malam',
noon: 'tengah hari',
morning: 'pagi',
afternoon: 'tengah hari',
evening: 'petang',
night: 'malam'
},
wide: {
am: 'a.m.',
pm: 'p.m.',
midnight: 'tengah malam',
noon: 'tengah hari',
morning: 'pagi',
afternoon: 'tengah hari',
evening: 'petang',
night: 'malam'
}
};
var ordinalNumber = function ordinalNumber(dirtyNumber, _options) {
// Can't use "pertama", "kedua" because can't be parsed
return 'ke-' + Number(dirtyNumber);
};
var localize = {
ordinalNumber: ordinalNumber,
era: (0, _index.default)({
values: eraValues,
defaultWidth: 'wide'
}),
quarter: (0, _index.default)({
values: quarterValues,
defaultWidth: 'wide',
argumentCallback: function argumentCallback(quarter) {
return 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;