1 // moment.js locale configuration
2 // locale : breton (br)
3 // author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou
6 if (typeof define
=== 'function' && define
.amd
) {
7 define(['moment'], factory
); // AMD
8 } else if (typeof exports
=== 'object') {
9 module
.exports
= factory(require('../moment')); // Node
11 factory((typeof global
!== 'undefined' ? global
: this).moment
); // node or other global
14 function relativeTimeWithMutation(number
, withoutSuffix
, key
) {
20 return number
+ ' ' + mutation(format
[key
], number
);
23 function specialMutationForYears(number
) {
24 switch (lastNumber(number
)) {
30 return number
+ ' bloaz';
32 return number
+ ' vloaz';
36 function lastNumber(number
) {
38 return lastNumber(number
% 10);
43 function mutation(text
, number
) {
45 return softMutation(text
);
50 function softMutation(text
) {
56 if (mutationTable
[text
.charAt(0)] === undefined) {
59 return mutationTable
[text
.charAt(0)] + text
.substring(1);
62 return moment
.defineLocale('br', {
63 months
: 'Genver_C\'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split('_'),
64 monthsShort
: 'Gen_C\'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),
65 weekdays
: 'Sul_Lun_Meurzh_Merc\'her_Yaou_Gwener_Sadorn'.split('_'),
66 weekdaysShort
: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),
67 weekdaysMin
: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),
72 LL
: 'D [a viz] MMMM YYYY',
73 LLL
: 'D [a viz] MMMM YYYY LT',
74 LLLL
: 'dddd, D [a viz] MMMM YYYY LT'
77 sameDay
: '[Hiziv da] LT',
78 nextDay
: '[Warc\'hoazh da] LT',
79 nextWeek
: 'dddd [da] LT',
80 lastDay
: '[Dec\'h da] LT',
81 lastWeek
: 'dddd [paset da] LT',
87 s
: 'un nebeud segondennoù',
89 mm
: relativeTimeWithMutation
,
93 dd
: relativeTimeWithMutation
,
95 MM
: relativeTimeWithMutation
,
97 yy
: specialMutationForYears
99 ordinalParse
: /\d{1,2}(añ|vet)/,
100 ordinal : function (number
) {
101 var output
= (number
=== 1) ? 'añ' : 'vet';
102 return number
+ output
;
105 dow
: 1, // Monday is the first day of the week.
106 doy
: 4 // The week that contains Jan 4th is the first week of the year.