1 // moment.js locale configuration
2 // locale : spanish (es)
3 // author : Julio Napurí : https://github.com/julionc
6 if (typeof define === 'function' && define.amd) {
7 define(['moment'], factory); // AMD
8 } else if (typeof exports === 'object') {
9 module.exports = factory(require('../moment')); // Node
11 factory((typeof global !== 'undefined' ? global : this).moment); // node or other global
14 var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'),
15 monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');
17 return moment.defineLocale('es', {
18 months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
19 monthsShort : function (m, format) {
20 if (/-MMM-/.test(format)) {
21 return monthsShort[m.month()];
23 return monthsShortDot[m.month()];
26 weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
27 weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
28 weekdaysMin : 'Do_Lu_Ma_Mi_Ju_Vi_Sá'.split('_'),
33 LL : 'D [de] MMMM [de] YYYY',
34 LLL : 'D [de] MMMM [de] YYYY LT',
35 LLLL : 'dddd, D [de] MMMM [de] YYYY LT'
38 sameDay : function () {
39 return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
41 nextDay : function () {
42 return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
44 nextWeek : function () {
45 return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
47 lastDay : function () {
48 return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
50 lastWeek : function () {
51 return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
70 ordinalParse : /\d{1,2}º/,
73 dow : 1, // Monday is the first day of the week.
74 doy : 4 // The week that contains Jan 4th is the first week of the year.