1 //! moment.js locale configuration
2 //! locale : spanish (es)
3 //! author : Julio Napurí : https://github.com/julionc
5 import moment from '../moment';
7 var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'),
8 monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');
10 export default moment.defineLocale('es', {
11 months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
12 monthsShort : function (m, format) {
13 if (/-MMM-/.test(format)) {
14 return monthsShort[m.month()];
16 return monthsShortDot[m.month()];
19 monthsParseExact : true,
20 weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
21 weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
22 weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'),
23 weekdaysParseExact : true,
28 LL : 'D [de] MMMM [de] YYYY',
29 LLL : 'D [de] MMMM [de] YYYY H:mm',
30 LLLL : 'dddd, D [de] MMMM [de] YYYY H:mm'
33 sameDay : function () {
34 return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
36 nextDay : function () {
37 return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
39 nextWeek : function () {
40 return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
42 lastDay : function () {
43 return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
45 lastWeek : function () {
46 return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
65 ordinalParse : /\d{1,2}º/,
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.