i18n date: abbreviazioni giorni localizzate (context Tide) in calendario, eventi e tooltip

This commit is contained in:
2026-09-02 12:50:04 +02:00
parent e9154f6eef
commit 60c777e650
5 changed files with 42 additions and 6 deletions
+3 -3
View File
@@ -169,8 +169,8 @@ function fmtHM(t) {
}
// Formato data breve
function fmtDate(t) {
function fmtDate(t, dn) {
var d = new Date(t);
var giorni = ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"];
return giorni[d.getDay()] + " " + (d.getDate() < 10 ? "0" : "") + d.getDate() + "/" + ((d.getMonth() + 1) < 10 ? "0" : "") + (d.getMonth() + 1);
var days = dn || ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"];
return days[d.getDay()] + " " + (d.getDate() < 10 ? "0" : "") + d.getDate() + "/" + ((d.getMonth() + 1) < 10 ? "0" : "") + (d.getMonth() + 1);
}