2019-06-10 17:38:54 +02:00
|
|
|
//! moment.js locale configuration
|
2020-07-23 23:12:30 +02:00
|
|
|
//! locale : Welsh [cy]
|
|
|
|
//! author : Robert Allen : https://github.com/robgallen
|
|
|
|
//! author : https://github.com/ryangreaves
|
2019-06-10 17:38:54 +02:00
|
|
|
|
|
|
|
;(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';
|
|
|
|
|
2020-07-23 23:12:30 +02:00
|
|
|
//! moment.js locale configuration
|
2019-06-10 17:38:54 +02:00
|
|
|
|
|
|
|
var cy = moment.defineLocale('cy', {
|
2020-07-23 23:12:30 +02:00
|
|
|
months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split(
|
|
|
|
'_'
|
|
|
|
),
|
|
|
|
monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split(
|
|
|
|
'_'
|
|
|
|
),
|
|
|
|
weekdays: 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split(
|
|
|
|
'_'
|
|
|
|
),
|
2019-06-10 17:38:54 +02:00
|
|
|
weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),
|
|
|
|
weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),
|
2020-07-23 23:12:30 +02:00
|
|
|
weekdaysParseExact: true,
|
2019-06-10 17:38:54 +02:00
|
|
|
// time formats are the same as en-gb
|
|
|
|
longDateFormat: {
|
|
|
|
LT: 'HH:mm',
|
2020-07-23 23:12:30 +02:00
|
|
|
LTS: 'HH:mm:ss',
|
2019-06-10 17:38:54 +02:00
|
|
|
L: 'DD/MM/YYYY',
|
|
|
|
LL: 'D MMMM YYYY',
|
|
|
|
LLL: 'D MMMM YYYY HH:mm',
|
2020-07-23 23:12:30 +02:00
|
|
|
LLLL: 'dddd, D MMMM YYYY HH:mm',
|
2019-06-10 17:38:54 +02:00
|
|
|
},
|
|
|
|
calendar: {
|
|
|
|
sameDay: '[Heddiw am] LT',
|
|
|
|
nextDay: '[Yfory am] LT',
|
|
|
|
nextWeek: 'dddd [am] LT',
|
|
|
|
lastDay: '[Ddoe am] LT',
|
|
|
|
lastWeek: 'dddd [diwethaf am] LT',
|
2020-07-23 23:12:30 +02:00
|
|
|
sameElse: 'L',
|
2019-06-10 17:38:54 +02:00
|
|
|
},
|
|
|
|
relativeTime: {
|
|
|
|
future: 'mewn %s',
|
|
|
|
past: '%s yn ôl',
|
|
|
|
s: 'ychydig eiliadau',
|
|
|
|
ss: '%d eiliad',
|
|
|
|
m: 'munud',
|
|
|
|
mm: '%d munud',
|
|
|
|
h: 'awr',
|
|
|
|
hh: '%d awr',
|
|
|
|
d: 'diwrnod',
|
|
|
|
dd: '%d diwrnod',
|
|
|
|
M: 'mis',
|
|
|
|
MM: '%d mis',
|
|
|
|
y: 'blwyddyn',
|
2020-07-23 23:12:30 +02:00
|
|
|
yy: '%d flynedd',
|
2019-06-10 17:38:54 +02:00
|
|
|
},
|
|
|
|
dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,
|
|
|
|
// traditional ordinal numbers above 31 are not commonly used in colloquial Welsh
|
|
|
|
ordinal: function (number) {
|
|
|
|
var b = number,
|
|
|
|
output = '',
|
|
|
|
lookup = [
|
2020-07-23 23:12:30 +02:00
|
|
|
'',
|
|
|
|
'af',
|
|
|
|
'il',
|
|
|
|
'ydd',
|
|
|
|
'ydd',
|
|
|
|
'ed',
|
|
|
|
'ed',
|
|
|
|
'ed',
|
|
|
|
'fed',
|
|
|
|
'fed',
|
|
|
|
'fed', // 1af to 10fed
|
|
|
|
'eg',
|
|
|
|
'fed',
|
|
|
|
'eg',
|
|
|
|
'eg',
|
|
|
|
'fed',
|
|
|
|
'eg',
|
|
|
|
'eg',
|
|
|
|
'fed',
|
|
|
|
'eg',
|
|
|
|
'fed', // 11eg to 20fed
|
2019-06-10 17:38:54 +02:00
|
|
|
];
|
|
|
|
if (b > 20) {
|
|
|
|
if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {
|
|
|
|
output = 'fed'; // not 30ain, 70ain or 90ain
|
|
|
|
} else {
|
|
|
|
output = 'ain';
|
|
|
|
}
|
|
|
|
} else if (b > 0) {
|
|
|
|
output = lookup[b];
|
|
|
|
}
|
|
|
|
return number + output;
|
|
|
|
},
|
2020-07-23 23:12:30 +02:00
|
|
|
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.
|
|
|
|
},
|
2019-06-10 17:38:54 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
return cy;
|
|
|
|
|
|
|
|
})));
|