10 years later #1
1 changed files with 7 additions and 1 deletions
|
|
@ -64,12 +64,18 @@ tags:
|
|||
const currentSeconds = currentDate.getSeconds();
|
||||
const currentMinutes = currentDate.getMinutes();
|
||||
const currentHours = currentDate.getHours();
|
||||
const currentDayOfWeek = currentDate.getDay(); // Get current day of the week (0-6, where 0 is Sunday)
|
||||
const currentDayOfWeek = getNumericWeekday(currentDate);
|
||||
const currentMonth = currentDate.getMonth() + 1; // Get current month (0-11)
|
||||
|
||||
drawCircle(currentSeconds, currentMinutes, currentHours, currentDayOfWeek, currentMonth);
|
||||
}
|
||||
|
||||
// TODO: Parameter für Wochenstart ergänzen
|
||||
function getNumericWeekday(date) {
|
||||
const weekday = date.getDay(); // 0 (Sunday) to 6 (Saturday)
|
||||
return (weekday === 0) ? 7 : weekday;
|
||||
}
|
||||
|
||||
updateCircle();
|
||||
setInterval(updateCircle, 1000);
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue