es.js 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. //! moment.js locale configuration
  2. //! locale : Spanish [es]
  3. //! author : Julio Napurí : https://github.com/julionc
  4. ;(function (global, factory) {
  5. typeof exports === 'object' && typeof module !== 'undefined'
  6. && typeof require === 'function' ? factory(require('../moment')) :
  7. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  8. factory(global.moment)
  9. }(this, (function (moment) { 'use strict';
  10. var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_');
  11. var monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');
  12. var es = moment.defineLocale('es', {
  13. months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
  14. monthsShort : function (m, format) {
  15. if (!m) {
  16. return monthsShortDot;
  17. } else if (/-MMM-/.test(format)) {
  18. return monthsShort[m.month()];
  19. } else {
  20. return monthsShortDot[m.month()];
  21. }
  22. },
  23. monthsParseExact : true,
  24. weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
  25. weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
  26. weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'),
  27. weekdaysParseExact : true,
  28. longDateFormat : {
  29. LT : 'H:mm',
  30. LTS : 'H:mm:ss',
  31. L : 'DD/MM/YYYY',
  32. LL : 'D [de] MMMM [de] YYYY',
  33. LLL : 'D [de] MMMM [de] YYYY H:mm',
  34. LLLL : 'dddd, D [de] MMMM [de] YYYY H:mm'
  35. },
  36. calendar : {
  37. sameDay : function () {
  38. return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  39. },
  40. nextDay : function () {
  41. return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  42. },
  43. nextWeek : function () {
  44. return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  45. },
  46. lastDay : function () {
  47. return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  48. },
  49. lastWeek : function () {
  50. return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  51. },
  52. sameElse : 'L'
  53. },
  54. relativeTime : {
  55. future : 'en %s',
  56. past : 'hace %s',
  57. s : 'unos segundos',
  58. m : 'un minuto',
  59. mm : '%d minutos',
  60. h : 'una hora',
  61. hh : '%d horas',
  62. d : 'un día',
  63. dd : '%d días',
  64. M : 'un mes',
  65. MM : '%d meses',
  66. y : 'un año',
  67. yy : '%d años'
  68. },
  69. dayOfMonthOrdinalParse : /\d{1,2}º/,
  70. ordinal : '%dº',
  71. week : {
  72. dow : 1, // Monday is the first day of the week.
  73. doy : 4 // The week that contains Jan 4th is the first week of the year.
  74. }
  75. });
  76. return es;
  77. })));