es.js 2.8 KB

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