UNPKG

3.44 kBJavaScriptView Raw
1//! moment.js locale configuration
2//! locale : Spanish (Dominican Republic) [es-do]
3
4import moment from '../moment';
5
6var monthsShortDot =
7 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
8 '_'
9 ),
10 monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
11 monthsParse = [
12 /^ene/i,
13 /^feb/i,
14 /^mar/i,
15 /^abr/i,
16 /^may/i,
17 /^jun/i,
18 /^jul/i,
19 /^ago/i,
20 /^sep/i,
21 /^oct/i,
22 /^nov/i,
23 /^dic/i,
24 ],
25 monthsRegex =
26 /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
27
28export default moment.defineLocale('es-do', {
29 months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
30 '_'
31 ),
32 monthsShort: function (m, format) {
33 if (!m) {
34 return monthsShortDot;
35 } else if (/-MMM-/.test(format)) {
36 return monthsShort[m.month()];
37 } else {
38 return monthsShortDot[m.month()];
39 }
40 },
41 monthsRegex: monthsRegex,
42 monthsShortRegex: monthsRegex,
43 monthsStrictRegex:
44 /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
45 monthsShortStrictRegex:
46 /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
47 monthsParse: monthsParse,
48 longMonthsParse: monthsParse,
49 shortMonthsParse: monthsParse,
50 weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
51 weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
52 weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
53 weekdaysParseExact: true,
54 longDateFormat: {
55 LT: 'h:mm A',
56 LTS: 'h:mm:ss A',
57 L: 'DD/MM/YYYY',
58 LL: 'D [de] MMMM [de] YYYY',
59 LLL: 'D [de] MMMM [de] YYYY h:mm A',
60 LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',
61 },
62 calendar: {
63 sameDay: function () {
64 return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
65 },
66 nextDay: function () {
67 return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
68 },
69 nextWeek: function () {
70 return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
71 },
72 lastDay: function () {
73 return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
74 },
75 lastWeek: function () {
76 return (
77 '[el] dddd [pasado a la' +
78 (this.hours() !== 1 ? 's' : '') +
79 '] LT'
80 );
81 },
82 sameElse: 'L',
83 },
84 relativeTime: {
85 future: 'en %s',
86 past: 'hace %s',
87 s: 'unos segundos',
88 ss: '%d segundos',
89 m: 'un minuto',
90 mm: '%d minutos',
91 h: 'una hora',
92 hh: '%d horas',
93 d: 'un día',
94 dd: '%d días',
95 w: 'una semana',
96 ww: '%d semanas',
97 M: 'un mes',
98 MM: '%d meses',
99 y: 'un año',
100 yy: '%d años',
101 },
102 dayOfMonthOrdinalParse: /\d{1,2}º/,
103 ordinal: '%dº',
104 week: {
105 dow: 1, // Monday is the first day of the week.
106 doy: 4, // The week that contains Jan 4th is the first week of the year.
107 },
108});