1 |
|
2 |
|
3 |
|
4 |
|
5 | ;(function (global, factory) {
|
6 | typeof exports === 'object' && typeof module !== 'undefined'
|
7 | && typeof require === 'function' ? factory(require('../moment')) :
|
8 | typeof define === 'function' && define.amd ? define(['../moment'], factory) :
|
9 | factory(global.moment)
|
10 | }(this, (function (moment) { 'use strict';
|
11 |
|
12 |
|
13 |
|
14 | var ca = moment.defineLocale('ca', {
|
15 | months: {
|
16 | standalone:
|
17 | 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split(
|
18 | '_'
|
19 | ),
|
20 | format: "de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split(
|
21 | '_'
|
22 | ),
|
23 | isFormat: /D[oD]?(\s)+MMMM/,
|
24 | },
|
25 | monthsShort:
|
26 | 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split(
|
27 | '_'
|
28 | ),
|
29 | monthsParseExact: true,
|
30 | weekdays:
|
31 | 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split(
|
32 | '_'
|
33 | ),
|
34 | weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),
|
35 | weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'),
|
36 | weekdaysParseExact: true,
|
37 | longDateFormat: {
|
38 | LT: 'H:mm',
|
39 | LTS: 'H:mm:ss',
|
40 | L: 'DD/MM/YYYY',
|
41 | LL: 'D MMMM [de] YYYY',
|
42 | ll: 'D MMM YYYY',
|
43 | LLL: 'D MMMM [de] YYYY [a les] H:mm',
|
44 | lll: 'D MMM YYYY, H:mm',
|
45 | LLLL: 'dddd D MMMM [de] YYYY [a les] H:mm',
|
46 | llll: 'ddd D MMM YYYY, H:mm',
|
47 | },
|
48 | calendar: {
|
49 | sameDay: function () {
|
50 | return '[avui a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
|
51 | },
|
52 | nextDay: function () {
|
53 | return '[demà a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
|
54 | },
|
55 | nextWeek: function () {
|
56 | return 'dddd [a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
|
57 | },
|
58 | lastDay: function () {
|
59 | return '[ahir a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
|
60 | },
|
61 | lastWeek: function () {
|
62 | return (
|
63 | '[el] dddd [passat a ' +
|
64 | (this.hours() !== 1 ? 'les' : 'la') +
|
65 | '] LT'
|
66 | );
|
67 | },
|
68 | sameElse: 'L',
|
69 | },
|
70 | relativeTime: {
|
71 | future: "d'aquí %s",
|
72 | past: 'fa %s',
|
73 | s: 'uns segons',
|
74 | ss: '%d segons',
|
75 | m: 'un minut',
|
76 | mm: '%d minuts',
|
77 | h: 'una hora',
|
78 | hh: '%d hores',
|
79 | d: 'un dia',
|
80 | dd: '%d dies',
|
81 | M: 'un mes',
|
82 | MM: '%d mesos',
|
83 | y: 'un any',
|
84 | yy: '%d anys',
|
85 | },
|
86 | dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
|
87 | ordinal: function (number, period) {
|
88 | var output =
|
89 | number === 1
|
90 | ? 'r'
|
91 | : number === 2
|
92 | ? 'n'
|
93 | : number === 3
|
94 | ? 'r'
|
95 | : number === 4
|
96 | ? 't'
|
97 | : 'è';
|
98 | if (period === 'w' || period === 'W') {
|
99 | output = 'a';
|
100 | }
|
101 | return number + output;
|
102 | },
|
103 | week: {
|
104 | dow: 1,
|
105 | doy: 4,
|
106 | },
|
107 | });
|
108 |
|
109 | return ca;
|
110 |
|
111 | })));
|