nl.js 3.2 KB

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