You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
2.9 KiB

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