[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-core/js/vendor/moment-js/locale/ -> bo.js (source)

   1  //! moment.js locale configuration
   2  //! locale : Tibetan [bo]
   3  //! author : Thupten N. Chakrishar : https://github.com/vajradog
   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  
  13      var symbolMap = {
  14          '1': '༡',
  15          '2': '༢',
  16          '3': '༣',
  17          '4': '༤',
  18          '5': '༥',
  19          '6': '༦',
  20          '7': '༧',
  21          '8': '༨',
  22          '9': '༩',
  23          '0': '༠'
  24      },
  25      numberMap = {
  26          '༡': '1',
  27          '༢': '2',
  28          '༣': '3',
  29          '༤': '4',
  30          '༥': '5',
  31          '༦': '6',
  32          '༧': '7',
  33          '༨': '8',
  34          '༩': '9',
  35          '༠': '0'
  36      };
  37  
  38      var bo = moment.defineLocale('bo', {
  39          months : 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'),
  40          monthsShort : 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'),
  41          weekdays : 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split('_'),
  42          weekdaysShort : 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'),
  43          weekdaysMin : 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'),
  44          longDateFormat : {
  45              LT : 'A h:mm',
  46              LTS : 'A h:mm:ss',
  47              L : 'DD/MM/YYYY',
  48              LL : 'D MMMM YYYY',
  49              LLL : 'D MMMM YYYY, A h:mm',
  50              LLLL : 'dddd, D MMMM YYYY, A h:mm'
  51          },
  52          calendar : {
  53              sameDay : '[དི་རིང] LT',
  54              nextDay : '[སང་ཉིན] LT',
  55              nextWeek : '[བདུན་ཕྲག་རྗེས་མ], LT',
  56              lastDay : '[ཁ་སང] LT',
  57              lastWeek : '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',
  58              sameElse : 'L'
  59          },
  60          relativeTime : {
  61              future : '%s ལ་',
  62              past : '%s སྔན་ལ',
  63              s : 'ལམ་སང',
  64              m : 'སྐར་མ་གཅིག',
  65              mm : '%d སྐར་མ',
  66              h : 'ཆུ་ཚོད་གཅིག',
  67              hh : '%d ཆུ་ཚོད',
  68              d : 'ཉིན་གཅིག',
  69              dd : '%d ཉིན་',
  70              M : 'ཟླ་བ་གཅིག',
  71              MM : '%d ཟླ་བ',
  72              y : 'ལོ་གཅིག',
  73              yy : '%d ལོ'
  74          },
  75          preparse: function (string) {
  76              return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {
  77                  return numberMap[match];
  78              });
  79          },
  80          postformat: function (string) {
  81              return string.replace(/\d/g, function (match) {
  82                  return symbolMap[match];
  83              });
  84          },
  85          meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,
  86          meridiemHour : function (hour, meridiem) {
  87              if (hour === 12) {
  88                  hour = 0;
  89              }
  90              if ((meridiem === 'མཚན་མོ' && hour >= 4) ||
  91                      (meridiem === 'ཉིན་གུང' && hour < 5) ||
  92                      meridiem === 'དགོང་དག') {
  93                  return hour + 12;
  94              } else {
  95                  return hour;
  96              }
  97          },
  98          meridiem : function (hour, minute, isLower) {
  99              if (hour < 4) {
 100                  return 'མཚན་མོ';
 101              } else if (hour < 10) {
 102                  return 'ཞོགས་ཀས';
 103              } else if (hour < 17) {
 104                  return 'ཉིན་གུང';
 105              } else if (hour < 20) {
 106                  return 'དགོང་དག';
 107              } else {
 108                  return 'མཚན་མོ';
 109              }
 110          },
 111          week : {
 112              dow : 0, // Sunday is the first day of the week.
 113              doy : 6  // The week that contains Jan 1st is the first week of the year.
 114          }
 115      });
 116  
 117      return bo;
 118  
 119  }));


Generated: Thu Aug 24 01:01:27 2023 Cross-referenced by PHPXref 0.7.1