[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

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

   1  //! moment.js locale configuration
   2  //! locale : Breton [br]
   3  //! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou
   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      function relativeTimeWithMutation(number, withoutSuffix, key) {
  14          var format = {
  15              'mm': 'munutenn',
  16              'MM': 'miz',
  17              'dd': 'devezh'
  18          };
  19          return number + ' ' + mutation(format[key], number);
  20      }
  21      function specialMutationForYears(number) {
  22          switch (lastNumber(number)) {
  23              case 1:
  24              case 3:
  25              case 4:
  26              case 5:
  27              case 9:
  28                  return number + ' bloaz';
  29              default:
  30                  return number + ' vloaz';
  31          }
  32      }
  33      function lastNumber(number) {
  34          if (number > 9) {
  35              return lastNumber(number % 10);
  36          }
  37          return number;
  38      }
  39      function mutation(text, number) {
  40          if (number === 2) {
  41              return softMutation(text);
  42          }
  43          return text;
  44      }
  45      function softMutation(text) {
  46          var mutationTable = {
  47              'm': 'v',
  48              'b': 'v',
  49              'd': 'z'
  50          };
  51          if (mutationTable[text.charAt(0)] === undefined) {
  52              return text;
  53          }
  54          return mutationTable[text.charAt(0)] + text.substring(1);
  55      }
  56  
  57      var br = moment.defineLocale('br', {
  58          months : 'Genver_C\'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split('_'),
  59          monthsShort : 'Gen_C\'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),
  60          weekdays : 'Sul_Lun_Meurzh_Merc\'her_Yaou_Gwener_Sadorn'.split('_'),
  61          weekdaysShort : 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),
  62          weekdaysMin : 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),
  63          weekdaysParseExact : true,
  64          longDateFormat : {
  65              LT : 'h[e]mm A',
  66              LTS : 'h[e]mm:ss A',
  67              L : 'DD/MM/YYYY',
  68              LL : 'D [a viz] MMMM YYYY',
  69              LLL : 'D [a viz] MMMM YYYY h[e]mm A',
  70              LLLL : 'dddd, D [a viz] MMMM YYYY h[e]mm A'
  71          },
  72          calendar : {
  73              sameDay : '[Hiziv da] LT',
  74              nextDay : '[Warc\'hoazh da] LT',
  75              nextWeek : 'dddd [da] LT',
  76              lastDay : '[Dec\'h da] LT',
  77              lastWeek : 'dddd [paset da] LT',
  78              sameElse : 'L'
  79          },
  80          relativeTime : {
  81              future : 'a-benn %s',
  82              past : '%s \'zo',
  83              s : 'un nebeud segondennoù',
  84              m : 'ur vunutenn',
  85              mm : relativeTimeWithMutation,
  86              h : 'un eur',
  87              hh : '%d eur',
  88              d : 'un devezh',
  89              dd : relativeTimeWithMutation,
  90              M : 'ur miz',
  91              MM : relativeTimeWithMutation,
  92              y : 'ur bloaz',
  93              yy : specialMutationForYears
  94          },
  95          ordinalParse: /\d{1,2}(añ|vet)/,
  96          ordinal : function (number) {
  97              var output = (number === 1) ? 'añ' : 'vet';
  98              return number + output;
  99          },
 100          week : {
 101              dow : 1, // Monday is the first day of the week.
 102              doy : 4  // The week that contains Jan 4th is the first week of the year.
 103          }
 104      });
 105  
 106      return br;
 107  
 108  }));


Generated: Fri Feb 26 01:01:36 2021 Cross-referenced by PHPXref 0.7.1