Fixed dates
This commit is contained in:
@@ -263,10 +263,14 @@ function formatDate(value) {
|
||||
if (isNaN(d)) {
|
||||
return value;
|
||||
}
|
||||
const dd = String(d.getDate()).padStart(2, "0");
|
||||
const mm = String(d.getMonth() + 1).padStart(2, "0");
|
||||
const yyyy = d.getFullYear();
|
||||
return `${dd}.${mm}.${yyyy}`;
|
||||
const parts = new Intl.DateTimeFormat("en-GB", {
|
||||
timeZone: "Europe/Ljubljana",
|
||||
day: "2-digit",
|
||||
month: "2-digit",
|
||||
year: "numeric",
|
||||
}).formatToParts(d);
|
||||
const map = Object.fromEntries(parts.map((p) => [p.type, p.value]));
|
||||
return `${map.day}.${map.month}.${map.year}`;
|
||||
}
|
||||
|
||||
function formatCurrencyEUR(value) {
|
||||
|
||||
Reference in New Issue
Block a user