AdminLTE/plugins/moment/locale/cy.js

109 lines
3.4 KiB
JavaScript
Raw Normal View History

//! moment.js locale configuration
2020-07-23 21:12:30 +00:00
//! locale : Welsh [cy]
//! author : Robert Allen : https://github.com/robgallen
//! author : https://github.com/ryangreaves
;(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 21:12:30 +00:00
//! moment.js locale configuration
var cy = moment.defineLocale('cy', {
2020-07-23 21:12:30 +00: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(
'_'
),
weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),
weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),
2020-07-23 21:12:30 +00:00
weekdaysParseExact: true,
// time formats are the same as en-gb
longDateFormat: {
LT: 'HH:mm',
2020-07-23 21:12:30 +00:00
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
2020-07-23 21:12:30 +00:00
LLLL: 'dddd, D MMMM YYYY HH:mm',
},
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 21:12:30 +00:00
sameElse: 'L',
},
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 21:12:30 +00:00
yy: '%d flynedd',
},
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 21:12:30 +00: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
];
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 21:12:30 +00: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.
},
});
return cy;
})));