Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
45 lines
973 B
Plaintext
45 lines
973 B
Plaintext
"use strict";
|
|
exports.formatRelative = void 0;
|
|
|
|
const formatRelativeLocale = {
|
|
lastWeek: (date) => {
|
|
switch (date.getDay()) {
|
|
case 0:
|
|
return "'prošlu nedjelju u' p";
|
|
case 3:
|
|
return "'prošlu srijedu u' p";
|
|
case 6:
|
|
return "'prošlu subotu u' p";
|
|
default:
|
|
return "'prošli' EEEE 'u' p";
|
|
}
|
|
},
|
|
yesterday: "'jučer u' p",
|
|
today: "'danas u' p",
|
|
tomorrow: "'sutra u' p",
|
|
nextWeek: (date) => {
|
|
switch (date.getDay()) {
|
|
case 0:
|
|
return "'iduću nedjelju u' p";
|
|
case 3:
|
|
return "'iduću srijedu u' p";
|
|
case 6:
|
|
return "'iduću subotu u' p";
|
|
default:
|
|
return "'prošli' EEEE 'u' p";
|
|
}
|
|
},
|
|
other: "P",
|
|
};
|
|
|
|
const formatRelative = (token, date, _baseDate, _options) => {
|
|
const format = formatRelativeLocale[token];
|
|
|
|
if (typeof format === "function") {
|
|
return format(date);
|
|
}
|
|
|
|
return format;
|
|
};
|
|
exports.formatRelative = formatRelative;
|