index.js 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. "use strict";
  2. var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
  3. Object.defineProperty(exports, "__esModule", {
  4. value: true
  5. });
  6. exports.default = void 0;
  7. var _index = _interopRequireDefault(require("../../../_lib/buildLocalizeFn/index.js"));
  8. var eraValues = {
  9. narrow: ['vC', 'nC'],
  10. abbreviated: ['vC', 'nC'],
  11. wide: ['voor Christus', 'na Christus']
  12. };
  13. var quarterValues = {
  14. narrow: ['1', '2', '3', '4'],
  15. abbreviated: ['K1', 'K2', 'K3', 'K4'],
  16. wide: ['1ste kwartaal', '2de kwartaal', '3de kwartaal', '4de kwartaal']
  17. };
  18. var monthValues = {
  19. narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],
  20. abbreviated: ['Jan', 'Feb', 'Mrt', 'Apr', 'Mei', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Des'],
  21. wide: ['Januarie', 'Februarie', 'Maart', 'April', 'Mei', 'Junie', 'Julie', 'Augustus', 'September', 'Oktober', 'November', 'Desember']
  22. };
  23. var dayValues = {
  24. narrow: ['S', 'M', 'D', 'W', 'D', 'V', 'S'],
  25. short: ['So', 'Ma', 'Di', 'Wo', 'Do', 'Vr', 'Sa'],
  26. abbreviated: ['Son', 'Maa', 'Din', 'Woe', 'Don', 'Vry', 'Sat'],
  27. wide: ['Sondag', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrydag', 'Saterdag']
  28. };
  29. var dayPeriodValues = {
  30. narrow: {
  31. am: 'vm',
  32. pm: 'nm',
  33. midnight: 'middernag',
  34. noon: 'middaguur',
  35. morning: 'oggend',
  36. afternoon: 'middag',
  37. evening: 'laat middag',
  38. night: 'aand'
  39. },
  40. abbreviated: {
  41. am: 'vm',
  42. pm: 'nm',
  43. midnight: 'middernag',
  44. noon: 'middaguur',
  45. morning: 'oggend',
  46. afternoon: 'middag',
  47. evening: 'laat middag',
  48. night: 'aand'
  49. },
  50. wide: {
  51. am: 'vm',
  52. pm: 'nm',
  53. midnight: 'middernag',
  54. noon: 'middaguur',
  55. morning: 'oggend',
  56. afternoon: 'middag',
  57. evening: 'laat middag',
  58. night: 'aand'
  59. }
  60. };
  61. var formattingDayPeriodValues = {
  62. narrow: {
  63. am: 'vm',
  64. pm: 'nm',
  65. midnight: 'middernag',
  66. noon: 'uur die middag',
  67. morning: 'uur die oggend',
  68. afternoon: 'uur die middag',
  69. evening: 'uur die aand',
  70. night: 'uur die aand'
  71. },
  72. abbreviated: {
  73. am: 'vm',
  74. pm: 'nm',
  75. midnight: 'middernag',
  76. noon: 'uur die middag',
  77. morning: 'uur die oggend',
  78. afternoon: 'uur die middag',
  79. evening: 'uur die aand',
  80. night: 'uur die aand'
  81. },
  82. wide: {
  83. am: 'vm',
  84. pm: 'nm',
  85. midnight: 'middernag',
  86. noon: 'uur die middag',
  87. morning: 'uur die oggend',
  88. afternoon: 'uur die middag',
  89. evening: 'uur die aand',
  90. night: 'uur die aand'
  91. }
  92. };
  93. var ordinalNumber = function ordinalNumber(dirtyNumber) {
  94. var number = Number(dirtyNumber);
  95. var rem100 = number % 100;
  96. if (rem100 < 20) {
  97. switch (rem100) {
  98. case 1:
  99. case 8:
  100. return number + 'ste';
  101. default:
  102. return number + 'de';
  103. }
  104. }
  105. return number + 'ste';
  106. };
  107. var localize = {
  108. ordinalNumber: ordinalNumber,
  109. era: (0, _index.default)({
  110. values: eraValues,
  111. defaultWidth: 'wide'
  112. }),
  113. quarter: (0, _index.default)({
  114. values: quarterValues,
  115. defaultWidth: 'wide',
  116. argumentCallback: function argumentCallback(quarter) {
  117. return quarter - 1;
  118. }
  119. }),
  120. month: (0, _index.default)({
  121. values: monthValues,
  122. defaultWidth: 'wide'
  123. }),
  124. day: (0, _index.default)({
  125. values: dayValues,
  126. defaultWidth: 'wide'
  127. }),
  128. dayPeriod: (0, _index.default)({
  129. values: dayPeriodValues,
  130. defaultWidth: 'wide',
  131. formattingValues: formattingDayPeriodValues,
  132. defaultFormattingWidth: 'wide'
  133. })
  134. };
  135. var _default = localize;
  136. exports.default = _default;
  137. module.exports = exports.default;