nl-be.js 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. //! moment.js locale configuration
  2. //! locale : Dutch (Belgium) [nl-be]
  3. //! author : Joris Röling : https://github.com/jorisroling
  4. //! author : Jacob Middag : https://github.com/middagj
  5. import moment from '../moment';
  6. var monthsShortWithDots =
  7. 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),
  8. monthsShortWithoutDots =
  9. 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),
  10. monthsParse = [
  11. /^jan/i,
  12. /^feb/i,
  13. /^maart|mrt.?$/i,
  14. /^apr/i,
  15. /^mei$/i,
  16. /^jun[i.]?$/i,
  17. /^jul[i.]?$/i,
  18. /^aug/i,
  19. /^sep/i,
  20. /^okt/i,
  21. /^nov/i,
  22. /^dec/i,
  23. ],
  24. monthsRegex =
  25. /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
  26. export default moment.defineLocale('nl-be', {
  27. months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(
  28. '_'
  29. ),
  30. monthsShort: function (m, format) {
  31. if (!m) {
  32. return monthsShortWithDots;
  33. } else if (/-MMM-/.test(format)) {
  34. return monthsShortWithoutDots[m.month()];
  35. } else {
  36. return monthsShortWithDots[m.month()];
  37. }
  38. },
  39. monthsRegex: monthsRegex,
  40. monthsShortRegex: monthsRegex,
  41. monthsStrictRegex:
  42. /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,
  43. monthsShortStrictRegex:
  44. /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
  45. monthsParse: monthsParse,
  46. longMonthsParse: monthsParse,
  47. shortMonthsParse: monthsParse,
  48. weekdays:
  49. 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
  50. weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
  51. weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
  52. weekdaysParseExact: true,
  53. longDateFormat: {
  54. LT: 'HH:mm',
  55. LTS: 'HH:mm:ss',
  56. L: 'DD/MM/YYYY',
  57. LL: 'D MMMM YYYY',
  58. LLL: 'D MMMM YYYY HH:mm',
  59. LLLL: 'dddd D MMMM YYYY HH:mm',
  60. },
  61. calendar: {
  62. sameDay: '[vandaag om] LT',
  63. nextDay: '[morgen om] LT',
  64. nextWeek: 'dddd [om] LT',
  65. lastDay: '[gisteren om] LT',
  66. lastWeek: '[afgelopen] dddd [om] LT',
  67. sameElse: 'L',
  68. },
  69. relativeTime: {
  70. future: 'over %s',
  71. past: '%s geleden',
  72. s: 'een paar seconden',
  73. ss: '%d seconden',
  74. m: 'één minuut',
  75. mm: '%d minuten',
  76. h: 'één uur',
  77. hh: '%d uur',
  78. d: 'één dag',
  79. dd: '%d dagen',
  80. M: 'één maand',
  81. MM: '%d maanden',
  82. y: 'één jaar',
  83. yy: '%d jaar',
  84. },
  85. dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
  86. ordinal: function (number) {
  87. return (
  88. number +
  89. (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
  90. );
  91. },
  92. week: {
  93. dow: 1, // Monday is the first day of the week.
  94. doy: 4, // The week that contains Jan 4th is the first week of the year.
  95. },
  96. });