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