index.js 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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: ['M.A', 'M.'],
  10. abbreviated: ['M.A', 'M.'],
  11. wide: ['Miloddan Avvalgi', 'Milodiy']
  12. };
  13. var quarterValues = {
  14. narrow: ['1', '2', '3', '4'],
  15. abbreviated: ['CH.1', 'CH.2', 'CH.3', 'CH.4'],
  16. wide: ['1-chi chorak', '2-chi chorak', '3-chi chorak', '4-chi chorak']
  17. };
  18. // Note: in English, the names of days of the week and months are capitalized.
  19. // If you are making a new locale based on this one, check if the same is true for the language you're working on.
  20. // Generally, formatted dates should look like they are in the middle of a sentence,
  21. // e.g. in Spanish language the weekdays and months should be in the lowercase.
  22. var monthValues = {
  23. narrow: ['Y', 'F', 'M', 'A', 'M', 'I', 'I', 'A', 'S', 'O', 'N', 'D'],
  24. abbreviated: ['Yan', 'Fev', 'Mar', 'Apr', 'May', 'Iyun', 'Iyul', 'Avg', 'Sen', 'Okt', 'Noy', 'Dek'],
  25. wide: ['Yanvar', 'Fevral', 'Mart', 'Aprel', 'May', 'Iyun', 'Iyul', 'Avgust', 'Sentabr', 'Oktabr', 'Noyabr', 'Dekabr']
  26. };
  27. var dayValues = {
  28. narrow: ['Y', 'D', 'S', 'CH', 'P', 'J', 'SH'],
  29. short: ['Ya', 'Du', 'Se', 'Cho', 'Pa', 'Ju', 'Sha'],
  30. abbreviated: ['Yak', 'Dush', 'Sesh', 'Chor', 'Pay', 'Jum', 'Shan'],
  31. wide: ['Yakshanba', 'Dushanba', 'Seshanba', 'Chorshanba', 'Payshanba', 'Juma', 'Shanba']
  32. };
  33. var dayPeriodValues = {
  34. narrow: {
  35. am: 'a',
  36. pm: 'p',
  37. midnight: 'y.t',
  38. noon: 'p.',
  39. morning: 'ertalab',
  40. afternoon: 'tushdan keyin',
  41. evening: 'kechqurun',
  42. night: 'tun'
  43. },
  44. abbreviated: {
  45. am: 'AM',
  46. pm: 'PM',
  47. midnight: 'yarim tun',
  48. noon: 'peshin',
  49. morning: 'ertalab',
  50. afternoon: 'tushdan keyin',
  51. evening: 'kechqurun',
  52. night: 'tun'
  53. },
  54. wide: {
  55. am: 'a.m.',
  56. pm: 'p.m.',
  57. midnight: 'yarim tun',
  58. noon: 'peshin',
  59. morning: 'ertalab',
  60. afternoon: 'tushdan keyin',
  61. evening: 'kechqurun',
  62. night: 'tun'
  63. }
  64. };
  65. var formattingDayPeriodValues = {
  66. narrow: {
  67. am: 'a',
  68. pm: 'p',
  69. midnight: 'y.t',
  70. noon: 'p.',
  71. morning: 'ertalab',
  72. afternoon: 'tushdan keyin',
  73. evening: 'kechqurun',
  74. night: 'tun'
  75. },
  76. abbreviated: {
  77. am: 'AM',
  78. pm: 'PM',
  79. midnight: 'yarim tun',
  80. noon: 'peshin',
  81. morning: 'ertalab',
  82. afternoon: 'tushdan keyin',
  83. evening: 'kechqurun',
  84. night: 'tun'
  85. },
  86. wide: {
  87. am: 'a.m.',
  88. pm: 'p.m.',
  89. midnight: 'yarim tun',
  90. noon: 'peshin',
  91. morning: 'ertalab',
  92. afternoon: 'tushdan keyin',
  93. evening: 'kechqurun',
  94. night: 'tun'
  95. }
  96. };
  97. var ordinalNumber = function ordinalNumber(dirtyNumber, _options) {
  98. return String(dirtyNumber);
  99. };
  100. var localize = {
  101. ordinalNumber: ordinalNumber,
  102. era: (0, _index.default)({
  103. values: eraValues,
  104. defaultWidth: 'wide'
  105. }),
  106. quarter: (0, _index.default)({
  107. values: quarterValues,
  108. defaultWidth: 'wide',
  109. argumentCallback: function argumentCallback(quarter) {
  110. return quarter - 1;
  111. }
  112. }),
  113. month: (0, _index.default)({
  114. values: monthValues,
  115. defaultWidth: 'wide'
  116. }),
  117. day: (0, _index.default)({
  118. values: dayValues,
  119. defaultWidth: 'wide'
  120. }),
  121. dayPeriod: (0, _index.default)({
  122. values: dayPeriodValues,
  123. defaultWidth: 'wide',
  124. formattingValues: formattingDayPeriodValues,
  125. defaultFormattingWidth: 'wide'
  126. })
  127. };
  128. var _default = localize;
  129. exports.default = _default;
  130. module.exports = exports.default;