ca.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. // moment.js locale configuration
  2. // locale : catalan (ca)
  3. // author : Juan G. Hurtado : https://github.com/juanghurtado
  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('ca', {
  14. months : 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'),
  15. monthsShort : 'gen._febr._mar._abr._mai._jun._jul._ag._set._oct._nov._des.'.split('_'),
  16. weekdays : 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'),
  17. weekdaysShort : 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),
  18. weekdaysMin : 'Dg_Dl_Dt_Dc_Dj_Dv_Ds'.split('_'),
  19. longDateFormat : {
  20. LT : 'H:mm',
  21. LTS : 'LT:ss',
  22. L : 'DD/MM/YYYY',
  23. LL : 'D MMMM YYYY',
  24. LLL : 'D MMMM YYYY LT',
  25. LLLL : 'dddd D MMMM YYYY LT'
  26. },
  27. calendar : {
  28. sameDay : function () {
  29. return '[avui a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
  30. },
  31. nextDay : function () {
  32. return '[demà a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
  33. },
  34. nextWeek : function () {
  35. return 'dddd [a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
  36. },
  37. lastDay : function () {
  38. return '[ahir a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
  39. },
  40. lastWeek : function () {
  41. return '[el] dddd [passat a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
  42. },
  43. sameElse : 'L'
  44. },
  45. relativeTime : {
  46. future : 'en %s',
  47. past : 'fa %s',
  48. s : 'uns segons',
  49. m : 'un minut',
  50. mm : '%d minuts',
  51. h : 'una hora',
  52. hh : '%d hores',
  53. d : 'un dia',
  54. dd : '%d dies',
  55. M : 'un mes',
  56. MM : '%d mesos',
  57. y : 'un any',
  58. yy : '%d anys'
  59. },
  60. ordinalParse: /\d{1,2}(r|n|t|è|a)/,
  61. ordinal : function (number, period) {
  62. var output = (number === 1) ? 'r' :
  63. (number === 2) ? 'n' :
  64. (number === 3) ? 'r' :
  65. (number === 4) ? 't' : 'è';
  66. if (period === 'w' || period === 'W') {
  67. output = 'a';
  68. }
  69. return number + output;
  70. },
  71. week : {
  72. dow : 1, // Monday is the first day of the week.
  73. doy : 4 // The week that contains Jan 4th is the first week of the year.
  74. }
  75. });
  76. }));