87 lines
2.0 KiB
JavaScript
87 lines
2.0 KiB
JavaScript
// Metro module 3393 (f3394).
|
|
let c1750_0 = {
|
|
lessThanXSeconds: {
|
|
one: "mindre än en sekund",
|
|
other: "mindre än {{count}} sekunder"
|
|
},
|
|
xSeconds: {
|
|
one: "en sekund",
|
|
other: "{{count}} sekunder"
|
|
},
|
|
halfAMinute: "en halv minut",
|
|
lessThanXMinutes: {
|
|
one: "mindre än en minut",
|
|
other: "mindre än {{count}} minuter"
|
|
},
|
|
xMinutes: {
|
|
one: "en minut",
|
|
other: "{{count}} minuter"
|
|
},
|
|
aboutXHours: {
|
|
one: "ungefär en timme",
|
|
other: "ungefär {{count}} timmar"
|
|
},
|
|
xHours: {
|
|
one: "en timme",
|
|
other: "{{count}} timmar"
|
|
},
|
|
xDays: {
|
|
one: "en dag",
|
|
other: "{{count}} dagar"
|
|
},
|
|
aboutXWeeks: {
|
|
one: "ungefär en vecka",
|
|
other: "ungefär {{count}} vecka"
|
|
},
|
|
xWeeks: {
|
|
one: "en vecka",
|
|
other: "{{count}} vecka"
|
|
},
|
|
aboutXMonths: {
|
|
one: "ungefär en månad",
|
|
other: "ungefär {{count}} månader"
|
|
},
|
|
xMonths: {
|
|
one: "en månad",
|
|
other: "{{count}} månader"
|
|
},
|
|
aboutXYears: {
|
|
one: "ungefär ett år",
|
|
other: "ungefär {{count}} år"
|
|
},
|
|
xYears: {
|
|
one: "ett år",
|
|
other: "{{count}} år"
|
|
},
|
|
overXYears: {
|
|
one: "över ett år",
|
|
other: "över {{count}} år"
|
|
},
|
|
almostXYears: {
|
|
one: "nästan ett år",
|
|
other: "nästan {{count}} år"
|
|
}
|
|
};
|
|
const _excluded = ["noll", "en", "två", "tre", "fyra", "fem", "sex", "sju", "åtta", "nio", "tio", "elva", "tolv"];
|
|
export default function formatDistance(a0, a1, a2) {
|
|
let one;
|
|
const r10 = c1750_0[a0];
|
|
let r11 = r10;
|
|
if (typeof r11 !== "string") {
|
|
L11: {
|
|
if (a1 === 1) {
|
|
one = r10.one;
|
|
} else {
|
|
if (a2 && a2.onlyNumeric) {
|
|
one = r10.other.replace("{{count}}", String(a1));
|
|
break L11;
|
|
}
|
|
one = r10.other.replace("{{count}}", a1 < 13 ? _excluded[a1] : String(a1));
|
|
}
|
|
}
|
|
r11 = one;
|
|
}
|
|
return a2 != null ? a2.addSuffix ? a2.comparison && a2.comparison > 0 ? "om " + r11 : r11 + " sedan" : r11 : r11;
|
|
};
|
|
module.exports = exports.default;
|