index.js 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. var _index = require("../localize/index.js");
  7. var formatDistanceLocale = {
  8. lessThanXSeconds: {
  9. one: 'প্রায় ১ সেকেন্ড',
  10. other: 'প্রায় {{count}} সেকেন্ড'
  11. },
  12. xSeconds: {
  13. one: '১ সেকেন্ড',
  14. other: '{{count}} সেকেন্ড'
  15. },
  16. halfAMinute: 'আধ মিনিট',
  17. lessThanXMinutes: {
  18. one: 'প্রায় ১ মিনিট',
  19. other: 'প্রায় {{count}} মিনিট'
  20. },
  21. xMinutes: {
  22. one: '১ মিনিট',
  23. other: '{{count}} মিনিট'
  24. },
  25. aboutXHours: {
  26. one: 'প্রায় ১ ঘন্টা',
  27. other: 'প্রায় {{count}} ঘন্টা'
  28. },
  29. xHours: {
  30. one: '১ ঘন্টা',
  31. other: '{{count}} ঘন্টা'
  32. },
  33. xDays: {
  34. one: '১ দিন',
  35. other: '{{count}} দিন'
  36. },
  37. aboutXWeeks: {
  38. one: 'প্রায় ১ সপ্তাহ',
  39. other: 'প্রায় {{count}} সপ্তাহ'
  40. },
  41. xWeeks: {
  42. one: '১ সপ্তাহ',
  43. other: '{{count}} সপ্তাহ'
  44. },
  45. aboutXMonths: {
  46. one: 'প্রায় ১ মাস',
  47. other: 'প্রায় {{count}} মাস'
  48. },
  49. xMonths: {
  50. one: '১ মাস',
  51. other: '{{count}} মাস'
  52. },
  53. aboutXYears: {
  54. one: 'প্রায় ১ বছর',
  55. other: 'প্রায় {{count}} বছর'
  56. },
  57. xYears: {
  58. one: '১ বছর',
  59. other: '{{count}} বছর'
  60. },
  61. overXYears: {
  62. one: '১ বছরের বেশি',
  63. other: '{{count}} বছরের বেশি'
  64. },
  65. almostXYears: {
  66. one: 'প্রায় ১ বছর',
  67. other: 'প্রায় {{count}} বছর'
  68. }
  69. };
  70. var formatDistance = function formatDistance(token, count, options) {
  71. var result;
  72. var tokenValue = formatDistanceLocale[token];
  73. if (typeof tokenValue === 'string') {
  74. result = tokenValue;
  75. } else if (count === 1) {
  76. result = tokenValue.one;
  77. } else {
  78. result = tokenValue.other.replace('{{count}}', (0, _index.numberToLocale)(count));
  79. }
  80. if (options !== null && options !== void 0 && options.addSuffix) {
  81. if (options.comparison && options.comparison > 0) {
  82. return result + ' এর মধ্যে';
  83. } else {
  84. return result + ' আগে';
  85. }
  86. }
  87. return result;
  88. };
  89. var _default = formatDistance;
  90. exports.default = _default;
  91. module.exports = exports.default;