index.js 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. var formatDistanceLocale = {
  7. lessThanXSeconds: {
  8. past: '{{count}} წამზე ნაკლები ხნის წინ',
  9. present: '{{count}} წამზე ნაკლები',
  10. future: '{{count}} წამზე ნაკლებში'
  11. },
  12. xSeconds: {
  13. past: '{{count}} წამის წინ',
  14. present: '{{count}} წამი',
  15. future: '{{count}} წამში'
  16. },
  17. halfAMinute: {
  18. past: 'ნახევარი წუთის წინ',
  19. present: 'ნახევარი წუთი',
  20. future: 'ნახევარი წუთში'
  21. },
  22. lessThanXMinutes: {
  23. past: '{{count}} წუთზე ნაკლები ხნის წინ',
  24. present: '{{count}} წუთზე ნაკლები',
  25. future: '{{count}} წუთზე ნაკლებში'
  26. },
  27. xMinutes: {
  28. past: '{{count}} წუთის წინ',
  29. present: '{{count}} წუთი',
  30. future: '{{count}} წუთში'
  31. },
  32. aboutXHours: {
  33. past: 'დაახლოებით {{count}} საათის წინ',
  34. present: 'დაახლოებით {{count}} საათი',
  35. future: 'დაახლოებით {{count}} საათში'
  36. },
  37. xHours: {
  38. past: '{{count}} საათის წინ',
  39. present: '{{count}} საათი',
  40. future: '{{count}} საათში'
  41. },
  42. xDays: {
  43. past: '{{count}} დღის წინ',
  44. present: '{{count}} დღე',
  45. future: '{{count}} დღეში'
  46. },
  47. aboutXWeeks: {
  48. past: 'დაახლოებით {{count}} კვირას წინ',
  49. present: 'დაახლოებით {{count}} კვირა',
  50. future: 'დაახლოებით {{count}} კვირაში'
  51. },
  52. xWeeks: {
  53. past: '{{count}} კვირას კვირა',
  54. present: '{{count}} კვირა',
  55. future: '{{count}} კვირაში'
  56. },
  57. aboutXMonths: {
  58. past: 'დაახლოებით {{count}} თვის წინ',
  59. present: 'დაახლოებით {{count}} თვე',
  60. future: 'დაახლოებით {{count}} თვეში'
  61. },
  62. xMonths: {
  63. past: '{{count}} თვის წინ',
  64. present: '{{count}} თვე',
  65. future: '{{count}} თვეში'
  66. },
  67. aboutXYears: {
  68. past: 'დაახლოებით {{count}} წლის წინ',
  69. present: 'დაახლოებით {{count}} წელი',
  70. future: 'დაახლოებით {{count}} წელში'
  71. },
  72. xYears: {
  73. past: '{{count}} წლის წინ',
  74. present: '{{count}} წელი',
  75. future: '{{count}} წელში'
  76. },
  77. overXYears: {
  78. past: '{{count}} წელზე მეტი ხნის წინ',
  79. present: '{{count}} წელზე მეტი',
  80. future: '{{count}} წელზე მეტი ხნის შემდეგ'
  81. },
  82. almostXYears: {
  83. past: 'თითქმის {{count}} წლის წინ',
  84. present: 'თითქმის {{count}} წელი',
  85. future: 'თითქმის {{count}} წელში'
  86. }
  87. };
  88. var formatDistance = function formatDistance(token, count, options) {
  89. var result;
  90. var tokenValue = formatDistanceLocale[token];
  91. if (typeof tokenValue === 'string') {
  92. result = tokenValue;
  93. } else if (options !== null && options !== void 0 && options.addSuffix && options.comparison && options.comparison > 0) {
  94. result = tokenValue.future.replace('{{count}}', String(count));
  95. } else if (options !== null && options !== void 0 && options.addSuffix) {
  96. result = tokenValue.past.replace('{{count}}', String(count));
  97. } else {
  98. result = tokenValue.present.replace('{{count}}', String(count));
  99. }
  100. return result;
  101. };
  102. var _default = formatDistance;
  103. exports.default = _default;
  104. module.exports = exports.default;