index.js 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. // Source: https://www.unicode.org/cldr/charts/32/summary/gu.html
  7. var formatDistanceLocale = {
  8. lessThanXSeconds: {
  9. one: 'હમણાં',
  10. // CLDR #1461
  11. other: '​આશરે {{count}} સેકંડ'
  12. },
  13. xSeconds: {
  14. one: '1 સેકંડ',
  15. other: '{{count}} સેકંડ'
  16. },
  17. halfAMinute: 'અડધી મિનિટ',
  18. lessThanXMinutes: {
  19. one: 'આ મિનિટ',
  20. // CLDR #1448
  21. other: '​આશરે {{count}} મિનિટ'
  22. },
  23. xMinutes: {
  24. one: '1 મિનિટ',
  25. other: '{{count}} મિનિટ'
  26. },
  27. aboutXHours: {
  28. one: '​આશરે 1 કલાક',
  29. other: '​આશરે {{count}} કલાક'
  30. },
  31. xHours: {
  32. one: '1 કલાક',
  33. other: '{{count}} કલાક'
  34. },
  35. xDays: {
  36. one: '1 દિવસ',
  37. other: '{{count}} દિવસ'
  38. },
  39. aboutXWeeks: {
  40. one: 'આશરે 1 અઠવાડિયું',
  41. other: 'આશરે {{count}} અઠવાડિયા'
  42. },
  43. xWeeks: {
  44. one: '1 અઠવાડિયું',
  45. other: '{{count}} અઠવાડિયા'
  46. },
  47. aboutXMonths: {
  48. one: 'આશરે 1 મહિનો',
  49. other: 'આશરે {{count}} મહિના'
  50. },
  51. xMonths: {
  52. one: '1 મહિનો',
  53. other: '{{count}} મહિના'
  54. },
  55. aboutXYears: {
  56. one: 'આશરે 1 વર્ષ',
  57. other: 'આશરે {{count}} વર્ષ'
  58. },
  59. xYears: {
  60. one: '1 વર્ષ',
  61. other: '{{count}} વર્ષ'
  62. },
  63. overXYears: {
  64. one: '1 વર્ષથી વધુ',
  65. other: '{{count}} વર્ષથી વધુ'
  66. },
  67. almostXYears: {
  68. one: 'લગભગ 1 વર્ષ',
  69. other: 'લગભગ {{count}} વર્ષ'
  70. }
  71. };
  72. var formatDistance = function formatDistance(token, count, options) {
  73. var result;
  74. var tokenValue = formatDistanceLocale[token];
  75. if (typeof tokenValue === 'string') {
  76. result = tokenValue;
  77. } else if (count === 1) {
  78. result = tokenValue.one;
  79. } else {
  80. result = tokenValue.other.replace('{{count}}', String(count));
  81. }
  82. if (options !== null && options !== void 0 && options.addSuffix) {
  83. if (options.comparison && options.comparison > 0) {
  84. return result + 'માં';
  85. } else {
  86. return result + ' પહેલાં';
  87. }
  88. }
  89. return result;
  90. };
  91. var _default = formatDistance;
  92. exports.default = _default;
  93. module.exports = exports.default;