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(window
.moment
); // Browser 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('_'),
32 LL
: 'D [de] MMMM [de] YYYY',
33 LLL
: 'D [de] MMMM [de] YYYY LT',
34 LLLL
: 'dddd, D [de] MMMM [de] YYYY LT'
37 sameDay : function () {
38 return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
40 nextDay : function () {
41 return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
43 nextWeek : function () {
44 return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
46 lastDay : function () {
47 return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
49 lastWeek : function () {
50 return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
71 dow
: 1, // Monday is the first day of the week.
72 doy
: 4 // The week that contains Jan 4th is the first week of the year.