[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

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

   1  //! moment.js locale configuration
   2  //! locale : Welsh [cy]
   3  //! author : Robert Allen : https://github.com/robgallen
   4  //! author : https://github.com/ryangreaves
   5  
   6  ;(function (global, factory) {
   7     typeof exports === 'object' && typeof module !== 'undefined'
   8         && typeof require === 'function' ? factory(require('../moment')) :
   9     typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  10     factory(global.moment)
  11  }(this, function (moment) { 'use strict';
  12  
  13  
  14      var cy = moment.defineLocale('cy', {
  15          months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split('_'),
  16          monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split('_'),
  17          weekdays: 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split('_'),
  18          weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),
  19          weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),
  20          weekdaysParseExact : true,
  21          // time formats are the same as en-gb
  22          longDateFormat: {
  23              LT: 'HH:mm',
  24              LTS : 'HH:mm:ss',
  25              L: 'DD/MM/YYYY',
  26              LL: 'D MMMM YYYY',
  27              LLL: 'D MMMM YYYY HH:mm',
  28              LLLL: 'dddd, D MMMM YYYY HH:mm'
  29          },
  30          calendar: {
  31              sameDay: '[Heddiw am] LT',
  32              nextDay: '[Yfory am] LT',
  33              nextWeek: 'dddd [am] LT',
  34              lastDay: '[Ddoe am] LT',
  35              lastWeek: 'dddd [diwethaf am] LT',
  36              sameElse: 'L'
  37          },
  38          relativeTime: {
  39              future: 'mewn %s',
  40              past: '%s yn ôl',
  41              s: 'ychydig eiliadau',
  42              m: 'munud',
  43              mm: '%d munud',
  44              h: 'awr',
  45              hh: '%d awr',
  46              d: 'diwrnod',
  47              dd: '%d diwrnod',
  48              M: 'mis',
  49              MM: '%d mis',
  50              y: 'blwyddyn',
  51              yy: '%d flynedd'
  52          },
  53          ordinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,
  54          // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh
  55          ordinal: function (number) {
  56              var b = number,
  57                  output = '',
  58                  lookup = [
  59                      '', 'af', 'il', 'ydd', 'ydd', 'ed', 'ed', 'ed', 'fed', 'fed', 'fed', // 1af to 10fed
  60                      'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'fed' // 11eg to 20fed
  61                  ];
  62              if (b > 20) {
  63                  if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {
  64                      output = 'fed'; // not 30ain, 70ain or 90ain
  65                  } else {
  66                      output = 'ain';
  67                  }
  68              } else if (b > 0) {
  69                  output = lookup[b];
  70              }
  71              return number + output;
  72          },
  73          week : {
  74              dow : 1, // Monday is the first day of the week.
  75              doy : 4  // The week that contains Jan 4th is the first week of the year.
  76          }
  77      });
  78  
  79      return cy;
  80  
  81  }));


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