decord/source/3582_formatDistance.js

32 lines
1.7 KiB
JavaScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 3582
// Function ID: 3583
2026-07-29 08:29:29 +00:00
// Name: formatDistance
2026-07-23 10:11:24 +00:00
// Dependencies: []
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 3582 (formatDistance)
2026-08-05 07:35:12 +00:00
let closure_0 = { lessThanXSeconds: { one: "menos de um segundo", other: "menos de {{count}} segundos" }, xSeconds: { one: "1 segundo", other: "{{count}} segundos" }, halfAMinute: "meio minuto", lessThanXMinutes: { one: "menos de um minuto", other: "menos de {{count}} minutos" }, xMinutes: { one: "1 minuto", other: "{{count}} minutos" }, aboutXHours: { one: "cerca de 1 hora", other: "cerca de {{count}} horas" }, xHours: { one: "1 hora", other: "{{count}} horas" }, xDays: { one: "1 dia", other: "{{count}} dias" }, aboutXWeeks: { one: "cerca de 1 semana", other: "cerca de {{count}} semanas" }, xWeeks: { one: "1 semana", other: "{{count}} semanas" }, aboutXMonths: { one: "cerca de 1 m\u00EAs", other: "cerca de {{count}} meses" }, xMonths: { one: "1 m\u00EAs", other: "{{count}} meses" }, aboutXYears: { one: "cerca de 1 ano", other: "cerca de {{count}} anos" }, xYears: { one: "1 ano", other: "{{count}} anos" }, overXYears: { one: "mais de 1 ano", other: "mais de {{count}} anos" }, almostXYears: { one: "quase 1 ano", other: "quase {{count}} anos" } };
2026-07-23 10:11:24 +00:00
export default function formatDistance(arg0, arg1, addSuffix) {
2026-08-04 21:03:28 +00:00
if (typeof table[arg0] === "string") {
2026-08-05 07:35:12 +00:00
let tmp6 = tmp;
2026-07-23 10:11:24 +00:00
if (null != addSuffix) {
2026-08-05 07:35:12 +00:00
tmp6 = tmp;
2026-07-23 10:11:24 +00:00
if (addSuffix.addSuffix) {
if (!addSuffix.comparison) {
2026-08-05 07:35:12 +00:00
let text = `há ${tmp}`;
2026-07-23 10:11:24 +00:00
}
2026-08-05 07:35:12 +00:00
text = `em ${tmp}`;
2026-07-23 10:11:24 +00:00
}
}
2026-08-05 07:35:12 +00:00
return tmp6;
2026-07-23 10:11:24 +00:00
} else if (1 === arg1) {
let one = tmp.one;
} else {
2026-08-05 07:35:12 +00:00
const _String = String;
one = tmp.other.replace("{{count}}", String(arg1));
2026-07-23 10:11:24 +00:00
const str = tmp.other;
}
};
export default exports.default;