forked from moment/moment
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert locales to es6, add locales to transpile task
- Loading branch information
Showing
82 changed files
with
5,356 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
//! moment.js locale configuration | ||
//! locale : afrikaans (af) | ||
//! author : Werner Mollentze : https://github.com/wernerm | ||
|
||
import moment from "../moment"; | ||
|
||
export default moment.defineLocale('af', { | ||
months : 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split('_'), | ||
monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'), | ||
weekdays : 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split('_'), | ||
weekdaysShort : 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'), | ||
weekdaysMin : 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'), | ||
meridiemParse: /vm|nm/i, | ||
isPM : function (input) { | ||
return /^nm$/i.test(input); | ||
}, | ||
meridiem : function (hours, minutes, isLower) { | ||
if (hours < 12) { | ||
return isLower ? 'vm' : 'VM'; | ||
} else { | ||
return isLower ? 'nm' : 'NM'; | ||
} | ||
}, | ||
longDateFormat : { | ||
LT : 'HH:mm', | ||
LTS : 'LT:ss', | ||
L : 'DD/MM/YYYY', | ||
LL : 'D MMMM YYYY', | ||
LLL : 'D MMMM YYYY LT', | ||
LLLL : 'dddd, D MMMM YYYY LT' | ||
}, | ||
calendar : { | ||
sameDay : '[Vandag om] LT', | ||
nextDay : '[Môre om] LT', | ||
nextWeek : 'dddd [om] LT', | ||
lastDay : '[Gister om] LT', | ||
lastWeek : '[Laas] dddd [om] LT', | ||
sameElse : 'L' | ||
}, | ||
relativeTime : { | ||
future : 'oor %s', | ||
past : '%s gelede', | ||
s : '\'n paar sekondes', | ||
m : '\'n minuut', | ||
mm : '%d minute', | ||
h : '\'n uur', | ||
hh : '%d ure', | ||
d : '\'n dag', | ||
dd : '%d dae', | ||
M : '\'n maand', | ||
MM : '%d maande', | ||
y : '\'n jaar', | ||
yy : '%d jaar' | ||
}, | ||
ordinalParse: /\d{1,2}(ste|de)/, | ||
ordinal : function (number) { | ||
return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); // Thanks to Joris Röling : https://github.com/jjupiter | ||
}, | ||
week : { | ||
dow : 1, // Maandag is die eerste dag van die week. | ||
doy : 4 // Die week wat die 4de Januarie bevat is die eerste week van die jaar. | ||
} | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
//! moment.js locale configuration | ||
//! locale : Moroccan Arabic (ar-ma) | ||
//! author : ElFadili Yassine : https://github.com/ElFadiliY | ||
//! author : Abdel Said : https://github.com/abdelsaid | ||
|
||
import moment from "../moment"; | ||
|
||
export default moment.defineLocale('ar-ma', { | ||
months : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), | ||
monthsShort : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), | ||
weekdays : 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), | ||
weekdaysShort : 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), | ||
weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), | ||
longDateFormat : { | ||
LT : 'HH:mm', | ||
LTS : 'LT:ss', | ||
L : 'DD/MM/YYYY', | ||
LL : 'D MMMM YYYY', | ||
LLL : 'D MMMM YYYY LT', | ||
LLLL : 'dddd D MMMM YYYY LT' | ||
}, | ||
calendar : { | ||
sameDay: '[اليوم على الساعة] LT', | ||
nextDay: '[غدا على الساعة] LT', | ||
nextWeek: 'dddd [على الساعة] LT', | ||
lastDay: '[أمس على الساعة] LT', | ||
lastWeek: 'dddd [على الساعة] LT', | ||
sameElse: 'L' | ||
}, | ||
relativeTime : { | ||
future : 'في %s', | ||
past : 'منذ %s', | ||
s : 'ثوان', | ||
m : 'دقيقة', | ||
mm : '%d دقائق', | ||
h : 'ساعة', | ||
hh : '%d ساعات', | ||
d : 'يوم', | ||
dd : '%d أيام', | ||
M : 'شهر', | ||
MM : '%d أشهر', | ||
y : 'سنة', | ||
yy : '%d سنوات' | ||
}, | ||
week : { | ||
dow : 6, // Saturday is the first day of the week. | ||
doy : 12 // The week that contains Jan 1st is the first week of the year. | ||
} | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
//! moment.js locale configuration | ||
//! locale : Arabic Saudi Arabia (ar-sa) | ||
//! author : Suhail Alkowaileet : https://github.com/xsoh | ||
|
||
import moment from "../moment"; | ||
|
||
export default moment.defineLocale('ar-sa', { | ||
months : 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), | ||
monthsShort : 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), | ||
weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), | ||
weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), | ||
weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), | ||
longDateFormat : { | ||
LT : 'HH:mm', | ||
LTS : 'HH:mm:ss', | ||
L : 'DD/MM/YYYY', | ||
LL : 'D MMMM YYYY', | ||
LLL : 'D MMMM YYYY LT', | ||
LLLL : 'dddd D MMMM YYYY LT' | ||
}, | ||
meridiemParse: /ص|م/, | ||
isPM : function (input) { | ||
return 'م' === input; | ||
}, | ||
meridiem : function (hour, minute, isLower) { | ||
if (hour < 12) { | ||
return 'ص'; | ||
} else { | ||
return 'م'; | ||
} | ||
}, | ||
calendar : { | ||
sameDay: '[اليوم على الساعة] LT', | ||
nextDay: '[غدا على الساعة] LT', | ||
nextWeek: 'dddd [على الساعة] LT', | ||
lastDay: '[أمس على الساعة] LT', | ||
lastWeek: 'dddd [على الساعة] LT', | ||
sameElse: 'L' | ||
}, | ||
relativeTime : { | ||
future : 'في %s', | ||
past : 'منذ %s', | ||
s : 'ثوان', | ||
m : 'دقيقة', | ||
mm : '%d دقائق', | ||
h : 'ساعة', | ||
hh : '%d ساعات', | ||
d : 'يوم', | ||
dd : '%d أيام', | ||
M : 'شهر', | ||
MM : '%d أشهر', | ||
y : 'سنة', | ||
yy : '%d سنوات' | ||
}, | ||
preparse: function (string) { | ||
return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { | ||
return numberMap[match]; | ||
}).replace(/،/g, ','); | ||
}, | ||
postformat: function (string) { | ||
return string.replace(/\d/g, function (match) { | ||
return symbolMap[match]; | ||
}).replace(/,/g, '،'); | ||
}, | ||
week : { | ||
dow : 6, // Saturday is the first day of the week. | ||
doy : 12 // The week that contains Jan 1st is the first week of the year. | ||
} | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
//! moment.js locale configuration | ||
//! locale : Tunisian Arabic (ar-tn) | ||
|
||
import moment from "../moment"; | ||
|
||
export default moment.defineLocale('ar-tn', { | ||
months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), | ||
monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), | ||
weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), | ||
weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), | ||
weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), | ||
longDateFormat: { | ||
LT: 'HH:mm', | ||
LTS: 'LT:ss', | ||
L: 'DD/MM/YYYY', | ||
LL: 'D MMMM YYYY', | ||
LLL: 'D MMMM YYYY LT', | ||
LLLL: 'dddd D MMMM YYYY LT' | ||
}, | ||
calendar: { | ||
sameDay: '[اليوم على الساعة] LT', | ||
nextDay: '[غدا على الساعة] LT', | ||
nextWeek: 'dddd [على الساعة] LT', | ||
lastDay: '[أمس على الساعة] LT', | ||
lastWeek: 'dddd [على الساعة] LT', | ||
sameElse: 'L' | ||
}, | ||
relativeTime: { | ||
future: 'في %s', | ||
past: 'منذ %s', | ||
s: 'ثوان', | ||
m: 'دقيقة', | ||
mm: '%d دقائق', | ||
h: 'ساعة', | ||
hh: '%d ساعات', | ||
d: 'يوم', | ||
dd: '%d أيام', | ||
M: 'شهر', | ||
MM: '%d أشهر', | ||
y: 'سنة', | ||
yy: '%d سنوات' | ||
}, | ||
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. | ||
} | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
//! moment.js locale configuration | ||
//! Locale: Arabic (ar) | ||
//! Author: Abdel Said: https://github.com/abdelsaid | ||
//! Changes in months, weekdays: Ahmed Elkhatib | ||
//! Native plural forms: forabi https://github.com/forabi | ||
|
||
import moment from "../moment"; | ||
|
||
export default moment.defineLocale('ar', { | ||
months : months, | ||
monthsShort : months, | ||
weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), | ||
weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), | ||
weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), | ||
longDateFormat : { | ||
LT : 'HH:mm', | ||
LTS : 'HH:mm:ss', | ||
L : 'DD/MM/YYYY', | ||
LL : 'D MMMM YYYY', | ||
LLL : 'D MMMM YYYY LT', | ||
LLLL : 'dddd D MMMM YYYY LT' | ||
}, | ||
meridiemParse: /ص|م/, | ||
isPM : function (input) { | ||
return 'م' === input; | ||
}, | ||
meridiem : function (hour, minute, isLower) { | ||
if (hour < 12) { | ||
return 'ص'; | ||
} else { | ||
return 'م'; | ||
} | ||
}, | ||
calendar : { | ||
sameDay: '[اليوم عند الساعة] LT', | ||
nextDay: '[غدًا عند الساعة] LT', | ||
nextWeek: 'dddd [عند الساعة] LT', | ||
lastDay: '[أمس عند الساعة] LT', | ||
lastWeek: 'dddd [عند الساعة] LT', | ||
sameElse: 'L' | ||
}, | ||
relativeTime : { | ||
future : 'بعد %s', | ||
past : 'منذ %s', | ||
s : pluralize('s'), | ||
m : pluralize('m'), | ||
mm : pluralize('m'), | ||
h : pluralize('h'), | ||
hh : pluralize('h'), | ||
d : pluralize('d'), | ||
dd : pluralize('d'), | ||
M : pluralize('M'), | ||
MM : pluralize('M'), | ||
y : pluralize('y'), | ||
yy : pluralize('y') | ||
}, | ||
preparse: function (string) { | ||
return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { | ||
return numberMap[match]; | ||
}).replace(/،/g, ','); | ||
}, | ||
postformat: function (string) { | ||
return string.replace(/\d/g, function (match) { | ||
return symbolMap[match]; | ||
}).replace(/,/g, '،'); | ||
}, | ||
week : { | ||
dow : 6, // Saturday is the first day of the week. | ||
doy : 12 // The week that contains Jan 1st is the first week of the year. | ||
} | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
//! moment.js locale configuration | ||
//! locale : azerbaijani (az) | ||
//! author : topchiyev : https://github.com/topchiyev | ||
|
||
import moment from "../moment"; | ||
|
||
export default moment.defineLocale('az', { | ||
months : 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split('_'), | ||
monthsShort : 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'), | ||
weekdays : 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split('_'), | ||
weekdaysShort : 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'), | ||
weekdaysMin : 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'), | ||
longDateFormat : { | ||
LT : 'HH:mm', | ||
LTS : 'LT:ss', | ||
L : 'DD.MM.YYYY', | ||
LL : 'D MMMM YYYY', | ||
LLL : 'D MMMM YYYY LT', | ||
LLLL : 'dddd, D MMMM YYYY LT' | ||
}, | ||
calendar : { | ||
sameDay : '[bugün saat] LT', | ||
nextDay : '[sabah saat] LT', | ||
nextWeek : '[gələn həftə] dddd [saat] LT', | ||
lastDay : '[dünən] LT', | ||
lastWeek : '[keçən həftə] dddd [saat] LT', | ||
sameElse : 'L' | ||
}, | ||
relativeTime : { | ||
future : '%s sonra', | ||
past : '%s əvvəl', | ||
s : 'birneçə saniyyə', | ||
m : 'bir dəqiqə', | ||
mm : '%d dəqiqə', | ||
h : 'bir saat', | ||
hh : '%d saat', | ||
d : 'bir gün', | ||
dd : '%d gün', | ||
M : 'bir ay', | ||
MM : '%d ay', | ||
y : 'bir il', | ||
yy : '%d il' | ||
}, | ||
meridiemParse: /gecə|səhər|gündüz|axşam/, | ||
isPM : function (input) { | ||
return /^(gündüz|axşam)$/.test(input); | ||
}, | ||
meridiem : function (hour, minute, isLower) { | ||
if (hour < 4) { | ||
return 'gecə'; | ||
} else if (hour < 12) { | ||
return 'səhər'; | ||
} else if (hour < 17) { | ||
return 'gündüz'; | ||
} else { | ||
return 'axşam'; | ||
} | ||
}, | ||
ordinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/, | ||
ordinal : function (number) { | ||
if (number === 0) { // special case for zero | ||
return number + '-ıncı'; | ||
} | ||
var a = number % 10, | ||
b = number % 100 - a, | ||
c = number >= 100 ? 100 : null; | ||
return number + (suffixes[a] || suffixes[b] || suffixes[c]); | ||
}, | ||
week : { | ||
dow : 1, // Monday is the first day of the week. | ||
doy : 7 // The week that contains Jan 1st is the first week of the year. | ||
} | ||
}); | ||
|
Oops, something went wrong.