nl.js 3.8 KB

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