zhizhi/backend/coldstart/node_modules/moment/dist/locale/km.js

104 lines
3.3 KiB
JavaScript

//! moment.js locale configuration
//! locale : Cambodian [km]
//! author : Kruy Vanna : https://github.com/kruyvanna
import moment from '../moment';
var symbolMap = {
1: '',
2: '',
3: '',
4: '',
5: '',
6: '',
7: '',
8: '',
9: '',
0: '',
},
numberMap = {
'': '1',
'': '2',
'': '3',
'': '4',
'': '5',
'': '6',
'': '7',
'': '8',
'': '9',
'': '0',
};
export default 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.
},
});