From 3ef9afb25d61bb9c9a1f3d0953efe015535aeda8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sat, 11 Jul 2020 17:33:38 +0200 Subject: {time => date}_to_percent. --- static/script.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/static/script.js b/static/script.js index a2643bef..edef739a 100644 --- a/static/script.js +++ b/static/script.js @@ -5,9 +5,9 @@ function round_time (time, fraction) { return Math.round (time * scale) / scale; } -function time_to_percent (time) { +function date_to_percent (date) { // Decimal time - return (time.getHours() + (time.getMinutes() / 60)) * 100/24 + "%" + return (date.getHours() + (date.getMinutes() / 60)) * 100/24; } function parents_until (element, obj) { @@ -189,7 +189,7 @@ function update_current_time_bar () { bar_object.id = "bar" } - bar_object.style.top = time_to_percent(now) + bar_object.style.top = date_to_percent(now) + "%"; event_area.append(bar_object) } -- cgit v1.2.3