You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
2.9 KiB

  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' ? factory(require('../moment')) :
  6. typeof define === 'function' && define.amd ? define(['moment'], factory) :
  7. factory(global.moment)
  8. }(this, function (moment) { 'use strict';
  9. var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'),
  10. monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');
  11. var es = moment.defineLocale('es', {
  12. months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
  13. monthsShort : function (m, format) {
  14. if (/-MMM-/.test(format)) {
  15. return monthsShort[m.month()];
  16. } else {
  17. return monthsShortDot[m.month()];
  18. }
  19. },
  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. longDateFormat : {
  24. LT : 'H:mm',
  25. LTS : 'LT:ss',
  26. L : 'DD/MM/YYYY',
  27. LL : 'D [de] MMMM [de] YYYY',
  28. LLL : 'D [de] MMMM [de] YYYY LT',
  29. LLLL : 'dddd, D [de] MMMM [de] YYYY LT'
  30. },
  31. calendar : {
  32. sameDay : function () {
  33. return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  34. },
  35. nextDay : function () {
  36. return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  37. },
  38. nextWeek : function () {
  39. return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  40. },
  41. lastDay : function () {
  42. return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  43. },
  44. lastWeek : function () {
  45. return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  46. },
  47. sameElse : 'L'
  48. },
  49. relativeTime : {
  50. future : 'en %s',
  51. past : 'hace %s',
  52. s : 'unos segundos',
  53. m : 'un minuto',
  54. mm : '%d minutos',
  55. h : 'una hora',
  56. hh : '%d horas',
  57. d : 'un día',
  58. dd : '%d días',
  59. M : 'un mes',
  60. MM : '%d meses',
  61. y : 'un año',
  62. yy : '%d años'
  63. },
  64. ordinalParse : /\d{1,2}º/,
  65. ordinal : '%dº',
  66. week : {
  67. dow : 1, // Monday is the first day of the week.
  68. doy : 4 // The week that contains Jan 4th is the first week of the year.
  69. }
  70. });
  71. return es;
  72. }));