Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade moment.js to latest version, add missing locales now that we
support more languages.
- Loading branch information
Showing
79 changed files
with
8,333 additions
and
1,344 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,65 @@ | ||
// moment.js locale configuration | ||
// locale : afrikaans (af) | ||
// author : Werner Mollentze : https://github.com/wernerm | ||
|
||
(function (factory) { | ||
if (typeof define === 'function' && define.amd) { | ||
define(['moment'], factory); // AMD | ||
} else if (typeof exports === 'object') { | ||
module.exports = factory(require('../moment')); // Node | ||
} else { | ||
factory(window.moment); // Browser global | ||
} | ||
}(function (moment) { | ||
return 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("_"), | ||
meridiem : function (hours, minutes, isLower) { | ||
if (hours < 12) { | ||
return isLower ? 'vm' : 'VM'; | ||
} else { | ||
return isLower ? 'nm' : 'NM'; | ||
} | ||
}, | ||
longDateFormat : { | ||
LT : "HH:mm", | ||
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" | ||
}, | ||
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,56 @@ | ||
// moment.js locale configuration | ||
// locale : Moroccan Arabic (ar-ma) | ||
// author : ElFadili Yassine : https://github.com/ElFadiliY | ||
// author : Abdel Said : https://github.com/abdelsaid | ||
|
||
(function (factory) { | ||
if (typeof define === 'function' && define.amd) { | ||
define(['moment'], factory); // AMD | ||
} else if (typeof exports === 'object') { | ||
module.exports = factory(require('../moment')); // Node | ||
} else { | ||
factory(window.moment); // Browser global | ||
} | ||
}(function (moment) { | ||
return moment.defineLocale('ar-ma', { | ||
months : "يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"), | ||
monthsShort : "يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"), | ||
weekdays : "الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"), | ||
weekdaysShort : "احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"), | ||
weekdaysMin : "ح_ن_ث_ر_خ_ج_س".split("_"), | ||
longDateFormat : { | ||
LT : "HH:mm", | ||
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,96 @@ | ||
// moment.js locale configuration | ||
// locale : Arabic Saudi Arabia (ar-sa) | ||
// author : Suhail Alkowaileet : https://github.com/xsoh | ||
|
||
(function (factory) { | ||
if (typeof define === 'function' && define.amd) { | ||
define(['moment'], factory); // AMD | ||
} else if (typeof exports === 'object') { | ||
module.exports = factory(require('../moment')); // Node | ||
} else { | ||
factory(window.moment); // Browser global | ||
} | ||
}(function (moment) { | ||
var symbolMap = { | ||
'1': '١', | ||
'2': '٢', | ||
'3': '٣', | ||
'4': '٤', | ||
'5': '٥', | ||
'6': '٦', | ||
'7': '٧', | ||
'8': '٨', | ||
'9': '٩', | ||
'0': '٠' | ||
}, numberMap = { | ||
'١': '1', | ||
'٢': '2', | ||
'٣': '3', | ||
'٤': '4', | ||
'٥': '5', | ||
'٦': '6', | ||
'٧': '7', | ||
'٨': '8', | ||
'٩': '9', | ||
'٠': '0' | ||
}; | ||
|
||
return moment.defineLocale('ar-sa', { | ||
months : "يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"), | ||
monthsShort : "يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"), | ||
weekdays : "الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"), | ||
weekdaysShort : "أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"), | ||
weekdaysMin : "ح_ن_ث_ر_خ_ج_س".split("_"), | ||
longDateFormat : { | ||
LT : "HH:mm", | ||
L : "DD/MM/YYYY", | ||
LL : "D MMMM YYYY", | ||
LLL : "D MMMM YYYY LT", | ||
LLLL : "dddd D MMMM YYYY LT" | ||
}, | ||
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,97 @@ | ||
// moment.js locale configuration | ||
// locale : Arabic (ar) | ||
// author : Abdel Said : https://github.com/abdelsaid | ||
// changes in months, weekdays : Ahmed Elkhatib | ||
|
||
(function (factory) { | ||
if (typeof define === 'function' && define.amd) { | ||
define(['moment'], factory); // AMD | ||
} else if (typeof exports === 'object') { | ||
module.exports = factory(require('../moment')); // Node | ||
} else { | ||
factory(window.moment); // Browser global | ||
} | ||
}(function (moment) { | ||
var symbolMap = { | ||
'1': '١', | ||
'2': '٢', | ||
'3': '٣', | ||
'4': '٤', | ||
'5': '٥', | ||
'6': '٦', | ||
'7': '٧', | ||
'8': '٨', | ||
'9': '٩', | ||
'0': '٠' | ||
}, numberMap = { | ||
'١': '1', | ||
'٢': '2', | ||
'٣': '3', | ||
'٤': '4', | ||
'٥': '5', | ||
'٦': '6', | ||
'٧': '7', | ||
'٨': '8', | ||
'٩': '9', | ||
'٠': '0' | ||
}; | ||
|
||
return moment.defineLocale('ar', { | ||
months : "يناير/ كانون الثاني_فبراير/ شباط_مارس/ آذار_أبريل/ نيسان_مايو/ أيار_يونيو/ حزيران_يوليو/ تموز_أغسطس/ آب_سبتمبر/ أيلول_أكتوبر/ تشرين الأول_نوفمبر/ تشرين الثاني_ديسمبر/ كانون الأول".split("_"), | ||
monthsShort : "يناير/ كانون الثاني_فبراير/ شباط_مارس/ آذار_أبريل/ نيسان_مايو/ أيار_يونيو/ حزيران_يوليو/ تموز_أغسطس/ آب_سبتمبر/ أيلول_أكتوبر/ تشرين الأول_نوفمبر/ تشرين الثاني_ديسمبر/ كانون الأول".split("_"), | ||
weekdays : "الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"), | ||
weekdaysShort : "أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"), | ||
weekdaysMin : "ح_ن_ث_ر_خ_ج_س".split("_"), | ||
longDateFormat : { | ||
LT : "HH:mm", | ||
L : "DD/MM/YYYY", | ||
LL : "D MMMM YYYY", | ||
LLL : "D MMMM YYYY LT", | ||
LLLL : "dddd D MMMM YYYY LT" | ||
}, | ||
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. | ||
} | ||
}); | ||
})); |
Oops, something went wrong.