pt.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. // moment.js locale configuration
  2. // locale : portuguese (pt)
  3. // author : Jefferson : https://github.com/jalex79
  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((typeof global !== 'undefined' ? global : this).moment); // node or other global
  11. }
  12. }(function (moment) {
  13. return moment.defineLocale('pt', {
  14. months : 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split('_'),
  15. monthsShort : 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
  16. weekdays : 'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split('_'),
  17. weekdaysShort : 'dom_seg_ter_qua_qui_sex_sáb'.split('_'),
  18. weekdaysMin : 'dom_2ª_3ª_4ª_5ª_6ª_sáb'.split('_'),
  19. longDateFormat : {
  20. LT : 'HH:mm',
  21. LTS : 'LT:ss',
  22. L : 'DD/MM/YYYY',
  23. LL : 'D [de] MMMM [de] YYYY',
  24. LLL : 'D [de] MMMM [de] YYYY LT',
  25. LLLL : 'dddd, D [de] MMMM [de] YYYY LT'
  26. },
  27. calendar : {
  28. sameDay: '[Hoje às] LT',
  29. nextDay: '[Amanhã às] LT',
  30. nextWeek: 'dddd [às] LT',
  31. lastDay: '[Ontem às] LT',
  32. lastWeek: function () {
  33. return (this.day() === 0 || this.day() === 6) ?
  34. '[Último] dddd [às] LT' : // Saturday + Sunday
  35. '[Última] dddd [às] LT'; // Monday - Friday
  36. },
  37. sameElse: 'L'
  38. },
  39. relativeTime : {
  40. future : 'em %s',
  41. past : 'há %s',
  42. s : 'segundos',
  43. m : 'um minuto',
  44. mm : '%d minutos',
  45. h : 'uma hora',
  46. hh : '%d horas',
  47. d : 'um dia',
  48. dd : '%d dias',
  49. M : 'um mês',
  50. MM : '%d meses',
  51. y : 'um ano',
  52. yy : '%d anos'
  53. },
  54. ordinalParse: /\d{1,2}º/,
  55. ordinal : '%dº',
  56. week : {
  57. dow : 1, // Monday is the first day of the week.
  58. doy : 4 // The week that contains Jan 4th is the first week of the year.
  59. }
  60. });
  61. }));