ca.js 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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 : '[el] D MMMM [de] YYYY',
  27. ll : 'D MMM YYYY',
  28. LLL : '[el] D MMMM [de] YYYY [a les] H:mm',
  29. lll : 'D MMM YYYY, H:mm',
  30. LLLL : '[el] 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. m : 'un minut',
  56. mm : '%d minuts',
  57. h : 'una hora',
  58. hh : '%d hores',
  59. d : 'un dia',
  60. dd : '%d dies',
  61. M : 'un mes',
  62. MM : '%d mesos',
  63. y : 'un any',
  64. yy : '%d anys'
  65. },
  66. dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
  67. ordinal : function (number, period) {
  68. var output = (number === 1) ? 'r' :
  69. (number === 2) ? 'n' :
  70. (number === 3) ? 'r' :
  71. (number === 4) ? 't' : 'è';
  72. if (period === 'w' || period === 'W') {
  73. output = 'a';
  74. }
  75. return number + output;
  76. },
  77. week : {
  78. dow : 1, // Monday is the first day of the week.
  79. doy : 4 // The week that contains Jan 4th is the first week of the year.
  80. }
  81. });
  82. return ca;
  83. })));