UNPKG

recoder-code

Version:

ЁЯЪА AI-powered development platform - Chat with 32+ models, build projects, automate workflows. Free models included!

100 lines (96 loc) тАв 2.63 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _index = require("../localize/index.js"); // Source: https://www.unicode.org/cldr/charts/32/summary/hi.html var formatDistanceLocale = { lessThanXSeconds: { one: 'рез рд╕реЗрдХрдВрдб рд╕реЗ рдХрдо', // CLDR #1310 other: '{{count}} рд╕реЗрдХрдВрдб рд╕реЗ рдХрдо' }, xSeconds: { one: 'рез рд╕реЗрдХрдВрдб', other: '{{count}} рд╕реЗрдХрдВрдб' }, halfAMinute: 'рдЖрдзрд╛ рдорд┐рдирдЯ', lessThanXMinutes: { one: 'рез рдорд┐рдирдЯ рд╕реЗ рдХрдо', other: '{{count}} рдорд┐рдирдЯ рд╕реЗ рдХрдо' }, xMinutes: { one: 'рез рдорд┐рдирдЯ', // CLDR #1307 other: '{{count}} рдорд┐рдирдЯ' }, aboutXHours: { one: 'рд▓рдЧрднрдЧ рез рдШрдВрдЯрд╛', other: 'рд▓рдЧрднрдЧ {{count}} рдШрдВрдЯреЗ' }, xHours: { one: 'рез рдШрдВрдЯрд╛', // CLDR #1304 other: '{{count}} рдШрдВрдЯреЗ' // CLDR #4467 }, xDays: { one: 'рез рджрд┐рди', // CLDR #1286 other: '{{count}} рджрд┐рди' }, aboutXWeeks: { one: 'рд▓рдЧрднрдЧ рез рд╕рдкреНрддрд╛рд╣', other: 'рд▓рдЧрднрдЧ {{count}} рд╕рдкреНрддрд╛рд╣' }, xWeeks: { one: 'рез рд╕рдкреНрддрд╛рд╣', other: '{{count}} рд╕рдкреНрддрд╛рд╣' }, aboutXMonths: { one: 'рд▓рдЧрднрдЧ рез рдорд╣реАрдирд╛', other: 'рд▓рдЧрднрдЧ {{count}} рдорд╣реАрдиреЗ' }, xMonths: { one: 'рез рдорд╣реАрдирд╛', other: '{{count}} рдорд╣реАрдиреЗ' }, aboutXYears: { one: 'рд▓рдЧрднрдЧ рез рд╡рд░реНрд╖', other: 'рд▓рдЧрднрдЧ {{count}} рд╡рд░реНрд╖' // CLDR #4823 }, xYears: { one: 'рез рд╡рд░реНрд╖', other: '{{count}} рд╡рд░реНрд╖' }, overXYears: { one: 'рез рд╡рд░реНрд╖ рд╕реЗ рдЕрдзрд┐рдХ', other: '{{count}} рд╡рд░реНрд╖ рд╕реЗ рдЕрдзрд┐рдХ' }, almostXYears: { one: 'рд▓рдЧрднрдЧ рез рд╡рд░реНрд╖', other: 'рд▓рдЧрднрдЧ {{count}} рд╡рд░реНрд╖' } }; var formatDistance = function formatDistance(token, count, options) { var result; var tokenValue = formatDistanceLocale[token]; if (typeof tokenValue === 'string') { result = tokenValue; } else if (count === 1) { result = tokenValue.one; } else { result = tokenValue.other.replace('{{count}}', (0, _index.numberToLocale)(count)); } if (options !== null && options !== void 0 && options.addSuffix) { if (options.comparison && options.comparison > 0) { return result + 'рдореЗ '; } else { return result + ' рдкрд╣рд▓реЗ'; } } return result; }; var _default = formatDistance; exports.default = _default; module.exports = exports.default;