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.
 
 
 
 

113 lines
4.0 KiB

//! moment.js locale configuration
//! locale : Cambodian [km]
//! author : Kruy Vanna : https://github.com/kruyvanna
;(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';
//! moment.js locale configuration
var symbolMap = {
1: '១',
2: '២',
3: '៣',
4: '៤',
5: '៥',
6: '៦',
7: '៧',
8: '៨',
9: '៩',
0: '០',
},
numberMap = {
'១': '1',
'២': '2',
'៣': '3',
'៤': '4',
'៥': '5',
'៦': '6',
'៧': '7',
'៨': '8',
'៩': '9',
'០': '0',
};
var km = moment.defineLocale('km', {
months: 'មករ_ក_ម_ម_ឧសភ_ម_កកកដ_ស_កញ_ត_វ_ធ'.split(
'_'
),
monthsShort: 'មករ_ក_ម_ម_ឧសភ_ម_កកកដ_ស_កញ_ត_វ_ធ'.split(
'_'
),
weekdays: 'អយ_ចទ_អងរ_ពធ_ពរហសបត_សរ_ស'.split('_'),
weekdaysShort: 'អ_ច_អ_ព_ពរ_ស_ស'.split('_'),
weekdaysMin: 'អ_ច_អ_ព_ពរ_ស_ស'.split('_'),
weekdaysParseExact: true,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd, D MMMM YYYY HH:mm',
},
meridiemParse: /ពក|លច/,
isPM: function (input) {
return input === 'លច';
},
meridiem: function (hour, minute, isLower) {
if (hour < 12) {
return 'ពក';
} else {
return 'លច';
}
},
calendar: {
sameDay: '[ថង] LT',
nextDay: '[សក មង] LT',
nextWeek: 'dddd [មង] LT',
lastDay: '[មលមញ មង] LT',
lastWeek: 'dddd [សបន] [មង] LT',
sameElse: 'L',
},
relativeTime: {
future: '%sទត',
past: '%sមន',
s: 'បនវ',
ss: '%d វ',
m: 'មយន',
mm: '%d ន',
h: 'មយមង',
hh: '%d មង',
d: 'មយថ',
dd: '%d ថ',
M: 'មយខ',
MM: '%d ខ',
y: 'មយឆ',
yy: '%d ឆ',
},
dayOfMonthOrdinalParse: /ទ\d{1,2}/,
ordinal: 'ទ%d',
preparse: function (string) {
return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) {
return numberMap[match];
});
},
postformat: function (string) {
return string.replace(/\d/g, function (match) {
return symbolMap[match];
});
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return km;
})));