oc-lnc.js 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. //! moment.js locale configuration
  2. //! locale : Occitan, lengadocian dialecte [oc-lnc]
  3. //! author : Quentin PAGÈS : https://github.com/Quenty31
  4. import moment from '../moment';
  5. export default moment.defineLocale('oc-lnc', {
  6. months: {
  7. standalone:
  8. 'genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre'.split(
  9. '_'
  10. ),
  11. format: "de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre".split(
  12. '_'
  13. ),
  14. isFormat: /D[oD]?(\s)+MMMM/,
  15. },
  16. monthsShort:
  17. 'gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.'.split(
  18. '_'
  19. ),
  20. monthsParseExact: true,
  21. weekdays: 'dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte'.split(
  22. '_'
  23. ),
  24. weekdaysShort: 'dg._dl._dm._dc._dj._dv._ds.'.split('_'),
  25. weekdaysMin: 'dg_dl_dm_dc_dj_dv_ds'.split('_'),
  26. weekdaysParseExact: true,
  27. longDateFormat: {
  28. LT: 'H:mm',
  29. LTS: 'H:mm:ss',
  30. L: 'DD/MM/YYYY',
  31. LL: 'D MMMM [de] YYYY',
  32. ll: 'D MMM YYYY',
  33. LLL: 'D MMMM [de] YYYY [a] H:mm',
  34. lll: 'D MMM YYYY, H:mm',
  35. LLLL: 'dddd D MMMM [de] YYYY [a] H:mm',
  36. llll: 'ddd D MMM YYYY, H:mm',
  37. },
  38. calendar: {
  39. sameDay: '[uèi a] LT',
  40. nextDay: '[deman a] LT',
  41. nextWeek: 'dddd [a] LT',
  42. lastDay: '[ièr a] LT',
  43. lastWeek: 'dddd [passat a] LT',
  44. sameElse: 'L',
  45. },
  46. relativeTime: {
  47. future: "d'aquí %s",
  48. past: 'fa %s',
  49. s: 'unas segondas',
  50. ss: '%d segondas',
  51. m: 'una minuta',
  52. mm: '%d minutas',
  53. h: 'una ora',
  54. hh: '%d oras',
  55. d: 'un jorn',
  56. dd: '%d jorns',
  57. M: 'un mes',
  58. MM: '%d meses',
  59. y: 'un an',
  60. yy: '%d ans',
  61. },
  62. dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
  63. ordinal: function (number, period) {
  64. var output =
  65. number === 1
  66. ? 'r'
  67. : number === 2
  68. ? 'n'
  69. : number === 3
  70. ? 'r'
  71. : number === 4
  72. ? 't'
  73. : 'è';
  74. if (period === 'w' || period === 'W') {
  75. output = 'a';
  76. }
  77. return number + output;
  78. },
  79. week: {
  80. dow: 1, // Monday is the first day of the week.
  81. doy: 4,
  82. },
  83. });