@rr0/cms
Version:
RR0 Content Management System (CMS)
39 lines (38 loc) • 1.38 kB
JavaScript
import { MessageUtils } from "../lang/index.js";
export class RR0TimeMessages_en {
constructor() {
this.duration = {
days: (d) => MessageUtils.plural(d, "day"),
hours: (d) => MessageUtils.plural(d, "hour"),
minutes: (mn) => MessageUtils.plural(mn, "minute"),
seconds: (s) => MessageUtils.plural(s, "second"),
lastSeparator: " and ",
approximate: (txt) => `${txt} approximately`
};
this.relative = {
year: {
before: "the year before",
after: "the year after"
},
month: {
before: "le month before",
after: "the month after",
later: "a month later"
},
day: {
before: "the day before",
after: "the day after"
},
hour: {
before: "one hour before",
after: "one hour later"
}
};
this.on = (approximate) => {
return (approximate ? "around " : "on");
};
this.in = (approximate) => (approximate ? "around " : "");
this.fromTo = (startReplacement, endReplacement) => startReplacement + " to " + endReplacement;
this.starting = (approximate) => "starting " + (approximate ? "" : "the ");
}
}