Blame view

node_modules/moment/locale/km.js 3.78 KB
ce4c83ff   wxy   初始提交
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
  //! moment.js locale configuration
  
  ;(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';
  
  
      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;
  
  })));