UNPKG

recoder-code

Version:

πŸš€ AI-powered development platform - Chat with 32+ models, build projects, automate workflows. Free models included!

83 lines β€’ 1.81 kB
var formatDistanceLocale = { lessThanXSeconds: { one: 'ε°‘ζ–Ό 1 η§’', other: 'ε°‘ζ–Ό {{count}} η§’' }, xSeconds: { one: '1 η§’', other: '{{count}} η§’' }, halfAMinute: 'εŠεˆ†ι˜', lessThanXMinutes: { one: 'ε°‘ζ–Ό 1 εˆ†ι˜', other: 'ε°‘ζ–Ό {{count}} εˆ†ι˜' }, xMinutes: { one: '1 εˆ†ι˜', other: '{{count}} εˆ†ι˜' }, xHours: { one: '1 小時', other: '{{count}} 小時' }, aboutXHours: { one: 'ε€§η΄„ 1 小時', other: 'ε€§η΄„ {{count}} 小時' }, xDays: { one: '1 倩', other: '{{count}} 倩' }, aboutXWeeks: { one: 'ε€§η΄„ 1 ε€‹ζ˜ŸζœŸ', other: 'ε€§η΄„ {{count}} ε€‹ζ˜ŸζœŸ' }, xWeeks: { one: '1 ε€‹ζ˜ŸζœŸ', other: '{{count}} ε€‹ζ˜ŸζœŸ' }, aboutXMonths: { one: 'ε€§η΄„ 1 ε€‹ζœˆ', other: 'ε€§η΄„ {{count}} ε€‹ζœˆ' }, xMonths: { one: '1 ε€‹ζœˆ', other: '{{count}} ε€‹ζœˆ' }, aboutXYears: { one: 'ε€§η΄„ 1 εΉ΄', other: 'ε€§η΄„ {{count}} εΉ΄' }, xYears: { one: '1 εΉ΄', other: '{{count}} εΉ΄' }, overXYears: { one: 'θΆ…ιŽ 1 εΉ΄', other: 'θΆ…ιŽ {{count}} εΉ΄' }, almostXYears: { one: 'ε°‡θΏ‘ 1 εΉ΄', 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}}', String(count)); } if (options !== null && options !== void 0 && options.addSuffix) { if (options.comparison && options.comparison > 0) { return result + 'ε…§'; } else { return result + '前'; } } return result; }; export default formatDistance;