es-us.js 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. //! moment.js locale configuration
  2. //! locale : Spanish (United States) [es-us]
  3. //! author : bustta : https://github.com/bustta
  4. //! author : chrisrodz : https://github.com/chrisrodz
  5. import moment from '../moment';
  6. var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'),
  7. monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');
  8. var monthsParse = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i];
  9. var monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
  10. export default moment.defineLocale('es-us', {
  11. months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
  12. monthsShort : function (m, format) {
  13. if (!m) {
  14. return monthsShortDot;
  15. } else if (/-MMM-/.test(format)) {
  16. return monthsShort[m.month()];
  17. } else {
  18. return monthsShortDot[m.month()];
  19. }
  20. },
  21. monthsRegex: monthsRegex,
  22. monthsShortRegex: monthsRegex,
  23. monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
  24. monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
  25. monthsParse: monthsParse,
  26. longMonthsParse: monthsParse,
  27. shortMonthsParse: monthsParse,
  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('_'),
  31. weekdaysParseExact : true,
  32. longDateFormat : {
  33. LT : 'h:mm A',
  34. LTS : 'h:mm:ss A',
  35. L : 'MM/DD/YYYY',
  36. LL : 'D [de] MMMM [de] YYYY',
  37. LLL : 'D [de] MMMM [de] YYYY h:mm A',
  38. LLLL : 'dddd, D [de] MMMM [de] YYYY h:mm A'
  39. },
  40. calendar : {
  41. sameDay : function () {
  42. return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  43. },
  44. nextDay : function () {
  45. return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  46. },
  47. nextWeek : function () {
  48. return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  49. },
  50. lastDay : function () {
  51. return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  52. },
  53. lastWeek : function () {
  54. return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  55. },
  56. sameElse : 'L'
  57. },
  58. relativeTime : {
  59. future : 'en %s',
  60. past : 'hace %s',
  61. s : 'unos segundos',
  62. ss : '%d segundos',
  63. m : 'un minuto',
  64. mm : '%d minutos',
  65. h : 'una hora',
  66. hh : '%d horas',
  67. d : 'un día',
  68. dd : '%d días',
  69. M : 'un mes',
  70. MM : '%d meses',
  71. y : 'un año',
  72. yy : '%d años'
  73. },
  74. dayOfMonthOrdinalParse : /\d{1,2}º/,
  75. ordinal : '%dº',
  76. week : {
  77. dow : 0, // Sunday is the first day of the week.
  78. doy : 6 // The week that contains Jan 6th is the first week of the year.
  79. }
  80. });