2018-04-26 15:15:53 +08:00
|
|
|
|
//! moment.js locale configuration
|
2020-11-11 09:34:26 +08:00
|
|
|
|
//! locale : Mongolian [mn]
|
|
|
|
|
//! author : Javkhlantugs Nyamdorj : https://github.com/javkhaanj7
|
2018-04-26 15:15:53 +08:00
|
|
|
|
|
|
|
|
|
;(function (global, factory) {
|
|
|
|
|
typeof exports === 'object' && typeof module !== 'undefined'
|
|
|
|
|
&& typeof require === 'function' ? factory(require('../moment')) :
|
|
|
|
|
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
|
|
|
|
|
factory(global.moment)
|
|
|
|
|
}(this, (function (moment) { 'use strict';
|
|
|
|
|
|
2020-11-11 09:34:26 +08:00
|
|
|
|
//! moment.js locale configuration
|
2018-04-26 15:15:53 +08:00
|
|
|
|
|
|
|
|
|
function translate(number, withoutSuffix, key, isFuture) {
|
|
|
|
|
switch (key) {
|
|
|
|
|
case 's':
|
|
|
|
|
return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын';
|
|
|
|
|
case 'ss':
|
|
|
|
|
return number + (withoutSuffix ? ' секунд' : ' секундын');
|
|
|
|
|
case 'm':
|
|
|
|
|
case 'mm':
|
|
|
|
|
return number + (withoutSuffix ? ' минут' : ' минутын');
|
|
|
|
|
case 'h':
|
|
|
|
|
case 'hh':
|
|
|
|
|
return number + (withoutSuffix ? ' цаг' : ' цагийн');
|
|
|
|
|
case 'd':
|
|
|
|
|
case 'dd':
|
|
|
|
|
return number + (withoutSuffix ? ' өдөр' : ' өдрийн');
|
|
|
|
|
case 'M':
|
|
|
|
|
case 'MM':
|
|
|
|
|
return number + (withoutSuffix ? ' сар' : ' сарын');
|
|
|
|
|
case 'y':
|
|
|
|
|
case 'yy':
|
|
|
|
|
return number + (withoutSuffix ? ' жил' : ' жилийн');
|
|
|
|
|
default:
|
|
|
|
|
return number;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var mn = moment.defineLocale('mn', {
|
2020-11-11 09:34:26 +08:00
|
|
|
|
months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split(
|
|
|
|
|
'_'
|
|
|
|
|
),
|
|
|
|
|
monthsShort: '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split(
|
|
|
|
|
'_'
|
|
|
|
|
),
|
|
|
|
|
monthsParseExact: true,
|
|
|
|
|
weekdays: 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'),
|
|
|
|
|
weekdaysShort: 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'),
|
|
|
|
|
weekdaysMin: 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'),
|
|
|
|
|
weekdaysParseExact: true,
|
|
|
|
|
longDateFormat: {
|
|
|
|
|
LT: 'HH:mm',
|
|
|
|
|
LTS: 'HH:mm:ss',
|
|
|
|
|
L: 'YYYY-MM-DD',
|
|
|
|
|
LL: 'YYYY оны MMMMын D',
|
|
|
|
|
LLL: 'YYYY оны MMMMын D HH:mm',
|
|
|
|
|
LLLL: 'dddd, YYYY оны MMMMын D HH:mm',
|
2018-04-26 15:15:53 +08:00
|
|
|
|
},
|
|
|
|
|
meridiemParse: /ҮӨ|ҮХ/i,
|
2020-11-11 09:34:26 +08:00
|
|
|
|
isPM: function (input) {
|
2018-04-26 15:15:53 +08:00
|
|
|
|
return input === 'ҮХ';
|
|
|
|
|
},
|
2020-11-11 09:34:26 +08:00
|
|
|
|
meridiem: function (hour, minute, isLower) {
|
2018-04-26 15:15:53 +08:00
|
|
|
|
if (hour < 12) {
|
|
|
|
|
return 'ҮӨ';
|
|
|
|
|
} else {
|
|
|
|
|
return 'ҮХ';
|
|
|
|
|
}
|
|
|
|
|
},
|
2020-11-11 09:34:26 +08:00
|
|
|
|
calendar: {
|
|
|
|
|
sameDay: '[Өнөөдөр] LT',
|
|
|
|
|
nextDay: '[Маргааш] LT',
|
|
|
|
|
nextWeek: '[Ирэх] dddd LT',
|
|
|
|
|
lastDay: '[Өчигдөр] LT',
|
|
|
|
|
lastWeek: '[Өнгөрсөн] dddd LT',
|
|
|
|
|
sameElse: 'L',
|
2018-04-26 15:15:53 +08:00
|
|
|
|
},
|
2020-11-11 09:34:26 +08:00
|
|
|
|
relativeTime: {
|
|
|
|
|
future: '%s дараа',
|
|
|
|
|
past: '%s өмнө',
|
|
|
|
|
s: translate,
|
|
|
|
|
ss: translate,
|
|
|
|
|
m: translate,
|
|
|
|
|
mm: translate,
|
|
|
|
|
h: translate,
|
|
|
|
|
hh: translate,
|
|
|
|
|
d: translate,
|
|
|
|
|
dd: translate,
|
|
|
|
|
M: translate,
|
|
|
|
|
MM: translate,
|
|
|
|
|
y: translate,
|
|
|
|
|
yy: translate,
|
2018-04-26 15:15:53 +08:00
|
|
|
|
},
|
|
|
|
|
dayOfMonthOrdinalParse: /\d{1,2} өдөр/,
|
2020-11-11 09:34:26 +08:00
|
|
|
|
ordinal: function (number, period) {
|
2018-04-26 15:15:53 +08:00
|
|
|
|
switch (period) {
|
|
|
|
|
case 'd':
|
|
|
|
|
case 'D':
|
|
|
|
|
case 'DDD':
|
|
|
|
|
return number + ' өдөр';
|
|
|
|
|
default:
|
|
|
|
|
return number;
|
|
|
|
|
}
|
2020-11-11 09:34:26 +08:00
|
|
|
|
},
|
2018-04-26 15:15:53 +08:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return mn;
|
|
|
|
|
|
|
|
|
|
})));
|