Debian Codegraph @

resources/lib/moment/locale/km.js

raw symbols SCIP
1 //! moment.js locale configuration
2 //! locale : Cambodian [km]
3 //! author : Kruy Vanna : https://github.com/kruyvanna
4
5 ;(function (global, factory) {
6 typeof exports === 'object' && typeof module !== 'undefined'
7 && typeof require === 'function' ? factory(require('../moment')) :
8 typeof define === 'function' && define.amd ? define(['../moment'], factory) :
9 factory(global.moment)
10 }(this, (function (moment) { 'use strict';
11
12 //! moment.js locale configuration
13
14 var symbolMap = {
15 '1': '១',
16 '2': '២',
17 '3': '៣',
18 '4': '៤',
19 '5': '៥',
20 '6': '៦',
21 '7': '៧',
22 '8': '៨',
23 '9': '៩',
24 '0': '០',
25 },
26 numberMap = {
27 '១': '1',
28 '២': '2',
29 '៣': '3',
30 '៤': '4',
31 '៥': '5',
32 '៦': '6',
33 '៧': '7',
34 '៨': '8',
35 '៩': '9',
36 '០': '0',
37 };
38
39 var km = moment.defineLocale('km', {
40 months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(
41 '_'
42 ),
43 monthsShort: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(
44 '_'
45 ),
46 weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),
47 weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),
48 weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),
49 weekdaysParseExact: true,
50 longDateFormat: {
51 LT: 'HH:mm',
52 LTS: 'HH:mm:ss',
53 L: 'DD/MM/YYYY',
54 LL: 'D MMMM YYYY',
55 LLL: 'D MMMM YYYY HH:mm',
56 LLLL: 'dddd, D MMMM YYYY HH:mm',
57 },
58 meridiemParse: /ព្រឹក|ល្ងាច/,
59 isPM: function (input) {
60 return input === 'ល្ងាច';
61 },
62 meridiem: function (hour, minute, isLower) {
63 if (hour < 12) {
64 return 'ព្រឹក';
65 } else {
66 return 'ល្ងាច';
67 }
68 },
69 calendar: {
70 sameDay: '[ថ្ងៃនេះ ម៉ោង] LT',
71 nextDay: '[ស្អែក ម៉ោង] LT',
72 nextWeek: 'dddd [ម៉ោង] LT',
73 lastDay: '[ម្សិលមិញ ម៉ោង] LT',
74 lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT',
75 sameElse: 'L',
76 },
77 relativeTime: {
78 future: '%sទៀត',
79 past: '%sមុន',
80 s: 'ប៉ុន្មានវិនាទី',
81 ss: '%d វិនាទី',
82 m: 'មួយនាទី',
83 mm: '%d នាទី',
84 h: 'មួយម៉ោង',
85 hh: '%d ម៉ោង',
86 d: 'មួយថ្ងៃ',
87 dd: '%d ថ្ងៃ',
88 M: 'មួយខែ',
89 MM: '%d ខែ',
90 y: 'មួយឆ្នាំ',
91 yy: '%d ឆ្នាំ',
92 },
93 dayOfMonthOrdinalParse: /ទី\d{1,2}/,
94 ordinal: 'ទី%d',
95 preparse: function (string) {
96 return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) {
97 return numberMap[match];
98 });
99 },
100 postformat: function (string) {
101 return string.replace(/\d/g, function (match) {
102 return symbolMap[match];
103 });
104 },
105 week: {
106 dow: 1, // Monday is the first day of the week.
107 doy: 4, // The week that contains Jan 4th is the first week of the year.
108 },
109 });
110
111 return km;
112
113 })));