1 //! moment.js locale configuration
2 //! locale : catalan (ca)
3 //! author : Juan G. Hurtado : https://github.com/juanghurtado
5 import moment from '../moment';
7 export default moment.defineLocale('ca', {
8 months : 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'),
9 monthsShort : 'gen._febr._mar._abr._mai._jun._jul._ag._set._oct._nov._des.'.split('_'),
10 monthsParseExact : true,
11 weekdays : 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'),
12 weekdaysShort : 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),
13 weekdaysMin : 'Dg_Dl_Dt_Dc_Dj_Dv_Ds'.split('_'),
14 weekdaysParseExact : true,
20 LLL : 'D MMMM YYYY H:mm',
21 LLLL : 'dddd D MMMM YYYY H:mm'
24 sameDay : function () {
25 return '[avui a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
27 nextDay : function () {
28 return '[demà a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
30 nextWeek : function () {
31 return 'dddd [a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
33 lastDay : function () {
34 return '[ahir a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
36 lastWeek : function () {
37 return '[el] dddd [passat a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
56 ordinalParse: /\d{1,2}(r|n|t|è|a)/,
57 ordinal : function (number, period) {
58 var output = (number === 1) ? 'r' :
59 (number === 2) ? 'n' :
60 (number === 3) ? 'r' :
61 (number === 4) ? 't' : 'è';
62 if (period === 'w' || period === 'W') {
65 return number + output;
68 dow : 1, // Monday is the first day of the week.
69 doy : 4 // The week that contains Jan 4th is the first week of the year.