ca.js 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. //! moment.js locale configuration
  2. //! locale : Catalan [ca]
  3. //! author : Juan G. Hurtado : https://github.com/juanghurtado
  4. ;(function (global, factory) {
  5. typeof exports === 'object' && typeof module !== 'undefined'
  6. && typeof require === 'function' ? factory(require('../moment')) :
  7. typeof define === 'function' && define.amd ? define(['../moment'], factory) :
  8. factory(global.moment)
  9. }(this, (function (moment) { 'use strict';
  10. var ca = moment.defineLocale('ca', {
  11. months : {
  12. standalone: 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'),
  13. format: 'de gener_de febrer_de març_d\'abril_de maig_de juny_de juliol_d\'agost_de setembre_d\'octubre_de novembre_de desembre'.split('_'),
  14. isFormat: /D[oD]?(\s)+MMMM/
  15. },
  16. monthsShort : 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split('_'),
  17. monthsParseExact : true,
  18. weekdays : 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'),
  19. weekdaysShort : 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),
  20. weekdaysMin : 'dg_dl_dt_dc_dj_dv_ds'.split('_'),
  21. weekdaysParseExact : true,
  22. longDateFormat : {
  23. LT : 'H:mm',
  24. LTS : 'H:mm:ss',
  25. L : 'DD/MM/YYYY',
  26. LL : 'D MMMM [de] YYYY',
  27. ll : 'D MMM YYYY',
  28. LLL : 'D MMMM [de] YYYY [a les] H:mm',
  29. lll : 'D MMM YYYY, H:mm',
  30. LLLL : 'dddd D MMMM [de] YYYY [a les] H:mm',
  31. llll : 'ddd D MMM YYYY, H:mm'
  32. },
  33. calendar : {
  34. sameDay : function () {
  35. return '[avui a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
  36. },
  37. nextDay : function () {
  38. return '[demà a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
  39. },
  40. nextWeek : function () {
  41. return 'dddd [a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
  42. },
  43. lastDay : function () {
  44. return '[ahir a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
  45. },
  46. lastWeek : function () {
  47. return '[el] dddd [passat a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
  48. },
  49. sameElse : 'L'
  50. },
  51. relativeTime : {
  52. future : 'd\'aquí %s',
  53. past : 'fa %s',
  54. s : 'uns segons',
  55. ss : '%d segons',
  56. m : 'un minut',
  57. mm : '%d minuts',
  58. h : 'una hora',
  59. hh : '%d hores',
  60. d : 'un dia',
  61. dd : '%d dies',
  62. M : 'un mes',
  63. MM : '%d mesos',
  64. y : 'un any',
  65. yy : '%d anys'
  66. },
  67. dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
  68. ordinal : function (number, period) {
  69. var output = (number === 1) ? 'r' :
  70. (number === 2) ? 'n' :
  71. (number === 3) ? 'r' :
  72. (number === 4) ? 't' : 'è';
  73. if (period === 'w' || period === 'W') {
  74. output = 'a';
  75. }
  76. return number + output;
  77. },
  78. week : {
  79. dow : 1, // Monday is the first day of the week.
  80. doy : 4 // The week that contains Jan 4th is the first week of the year.
  81. }
  82. });
  83. return ca;
  84. })));