diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-07-11 17:33:38 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-07-11 17:33:38 +0200 |
commit | 3ef9afb25d61bb9c9a1f3d0953efe015535aeda8 (patch) | |
tree | c911d794da3af5356c339bf5ab39a5ab23f24678 | |
parent | Break out bind_properties function. (diff) | |
download | calp-3ef9afb25d61bb9c9a1f3d0953efe015535aeda8.tar.gz calp-3ef9afb25d61bb9c9a1f3d0953efe015535aeda8.tar.xz |
{time => date}_to_percent.
Diffstat (limited to '')
-rw-r--r-- | static/script.js | 6 |
1 files 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) } |