fix some revisi

This commit is contained in:
Jagad R R
2025-01-19 15:11:21 +07:00
parent 1610d83bc6
commit d1085d4b30
2 changed files with 33 additions and 23 deletions
+17 -1
View File
@@ -26,6 +26,12 @@
<li class="nav-item">
<a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a>
</li>
<li class="nav-item">
{{-- periode --}}
<a class="nav-link" href="{{ route('dashboard.index') }}" role="button">
<span class="ml-2 font-weight-bold text-white">Periode: <span id="periode"></span></span>
</a>
</li>
</ul>
<div class="navbar-center text-white m-auto">
@@ -165,7 +171,7 @@
hour12: false // Use 24-hour format
};
dateTimeElement.textContent = new Intl.DateTimeFormat('id-ID', options).format(now);
dateTimeElement.textContent = new Intl.DateTimeFormat('id-ID', options).format(now) + ' WIB';
}
// Update the clock every second
@@ -226,4 +232,14 @@
});
});
const periode = document.getElementById('periode');
const date = new Date();
const months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
const month = months[date.getMonth()]; // Get the current month's short name
const nextMonth = months[(date.getMonth() + 1) % 12]; // Get the next month's short name, wrapping around if necessary
const year = date.getFullYear();
periode.textContent = `${month} (12 ${month} - 10 ${nextMonth} ${year})`;
</script>