21cc29e18b8194261426dd4eff6d22490182473e6535a2793b938a163718f0d2f1d34a80fa22ae6228af4dde7716eded5111f86c302d116ef7841373cd0596 2.4 KB

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