30 lines
1.7 KiB
JavaScript
30 lines
1.7 KiB
JavaScript
// Module ID: 1949
|
|
// Function ID: 1950
|
|
// Name: formatDistance
|
|
// Dependencies: []
|
|
// Exports: default
|
|
|
|
// Module 1949 (formatDistance)
|
|
let closure_0 = { lessThanXSeconds: { one: "less than a second", other: "less than {{count}} seconds" }, xSeconds: { one: "1 second", other: "{{count}} seconds" }, halfAMinute: "half a minute", lessThanXMinutes: { one: "less than a minute", other: "less than {{count}} minutes" }, xMinutes: { one: "1 minute", other: "{{count}} minutes" }, aboutXHours: { one: "about 1 hour", other: "about {{count}} hours" }, xHours: { one: "1 hour", other: "{{count}} hours" }, xDays: { one: "1 day", other: "{{count}} days" }, aboutXWeeks: { one: "about 1 week", other: "about {{count}} weeks" }, xWeeks: { one: "1 week", other: "{{count}} weeks" }, aboutXMonths: { one: "about 1 month", other: "about {{count}} months" }, xMonths: { one: "1 month", other: "{{count}} months" }, aboutXYears: { one: "about 1 year", other: "about {{count}} years" }, xYears: { one: "1 year", other: "{{count}} years" }, overXYears: { one: "over 1 year", other: "over {{count}} years" }, almostXYears: { one: "almost 1 year", other: "almost {{count}} years" } };
|
|
|
|
export default function formatDistance(arg0, arg1, addSuffix) {
|
|
if (typeof table[arg0] === "y") {
|
|
let tmp5 = tmp;
|
|
if (null != addSuffix) {
|
|
tmp5 = tmp;
|
|
if (addSuffix.addSuffix) {
|
|
if (!addSuffix.comparison) {
|
|
let text = `${tmp} ago`;
|
|
}
|
|
text = `in ${tmp}`;
|
|
}
|
|
}
|
|
return tmp5;
|
|
} else if (1 === arg1) {
|
|
let one = tmp.one;
|
|
} else {
|
|
one = tmp.other.replace("{{count}}", arg1.toString());
|
|
const str = tmp.other;
|
|
}
|
|
};
|
|
export default exports.default;
|