1 // moment.js locale configuration
2 // locale : catalan (ca)
3 // author : Juan G. Hurtado : https://github.com/juanghurtado
6 // Comment out broken wrapper, see T145382
7 /*if (typeof define === 'function' && define.amd) {
8 define(['moment'], factory); // AMD
9 } else if (typeof exports === 'object') {
10 module.exports = factory(require('../moment')); // Node
12 factory((typeof global !== 'undefined' ? global : this).moment); // node or other global
16 return moment.defineLocale('ca', {
17 months : 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'),
18 monthsShort : 'gen._febr._mar._abr._mai._jun._jul._ag._set._oct._nov._des.'.split('_'),
19 weekdays : 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'),
20 weekdaysShort : 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),
21 weekdaysMin : 'Dg_Dl_Dt_Dc_Dj_Dv_Ds'.split('_'),
27 LLL : 'D MMMM YYYY LT',
28 LLLL : 'dddd D MMMM YYYY LT'
31 sameDay : function () {
32 return '[avui a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
34 nextDay : function () {
35 return '[demà a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
37 nextWeek : function () {
38 return 'dddd [a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
40 lastDay : function () {
41 return '[ahir a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
43 lastWeek : function () {
44 return '[el] dddd [passat a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
63 ordinalParse: /\d{1,2}(r|n|t|è|a)/,
64 ordinal : function (number, period) {
65 var output = (number === 1) ? 'r' :
66 (number === 2) ? 'n' :
67 (number === 3) ? 'r' :
68 (number === 4) ? 't' : 'è';
69 if (period === 'w' || period === 'W') {
72 return number + output;
75 dow : 1, // Monday is the first day of the week.
76 doy : 4 // The week that contains Jan 4th is the first week of the year.