|
|
|
|
|
;(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'; |
|
|
|
|
|
var cy = moment.defineLocale('cy', { |
|
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('_'), |
|
weekdaysParseExact : true, |
|
|
|
longDateFormat: { |
|
LT: 'HH:mm', |
|
LTS : 'HH:mm:ss', |
|
L: 'DD/MM/YYYY', |
|
LL: 'D MMMM YYYY', |
|
LLL: 'D MMMM YYYY HH:mm', |
|
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', |
|
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', |
|
yy: '%d flynedd' |
|
}, |
|
dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/, |
|
|
|
ordinal: function (number) { |
|
var b = number, |
|
output = '', |
|
lookup = [ |
|
'', 'af', 'il', 'ydd', 'ydd', 'ed', 'ed', 'ed', 'fed', 'fed', 'fed', |
|
'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'fed' |
|
]; |
|
if (b > 20) { |
|
if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) { |
|
output = 'fed'; |
|
} else { |
|
output = 'ain'; |
|
} |
|
} else if (b > 0) { |
|
output = lookup[b]; |
|
} |
|
return number + output; |
|
}, |
|
week : { |
|
dow : 1, |
|
doy : 4 |
|
} |
|
}); |
|
|
|
return cy; |
|
|
|
}))); |
|
|