ca.js 2.9 KB

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