1 // moment.js locale configuration
2 // locale : spanish (es)
3 // author : Julio Napurí : https://github.com/julionc
6 // Comment out broken wrapper, see T145382
7 /*if (typeof define === 'function' && define.amd) {
8 define(['moment'], factory); // AMD
9 } else if (typeof exports === 'object') {
10 module.exports = factory(require('../moment')); // Node
12 factory((typeof global !== 'undefined' ? global : this).moment); // node or other global
16 var monthsShortDot
= 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'),
17 monthsShort
= 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');
19 return moment
.defineLocale('es', {
20 months
: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
21 monthsShort : function (m
, format
) {
22 if (/-MMM-/.test(format
)) {
23 return monthsShort
[m
.month()];
25 return monthsShortDot
[m
.month()];
28 weekdays
: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
29 weekdaysShort
: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
30 weekdaysMin
: 'Do_Lu_Ma_Mi_Ju_Vi_Sá'.split('_'),
35 LL
: 'D [de] MMMM [de] YYYY',
36 LLL
: 'D [de] MMMM [de] YYYY LT',
37 LLLL
: 'dddd, D [de] MMMM [de] YYYY LT'
40 sameDay : function () {
41 return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
43 nextDay : function () {
44 return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
46 nextWeek : function () {
47 return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
49 lastDay : function () {
50 return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
52 lastWeek : function () {
53 return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
72 ordinalParse
: /\d{1,2}º/,
75 dow
: 1, // Monday is the first day of the week.
76 doy
: 4 // The week that contains Jan 4th is the first week of the year.