aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--public/js/app.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/public/js/app.js b/public/js/app.js
index f256c84..728f267 100644
--- a/public/js/app.js
+++ b/public/js/app.js
@@ -42,9 +42,12 @@ window.addEventListener("load", function() {
s.push(screening)
};
- function time_f(t) {
- let f = Intl.NumberFormat('nb-NO', { minimumIntegerDigits: 2 })
- return [ f.format(t.getHours()), f.format(t.getMinutes()) ].join(':')
+ function pad(num) {
+ return num > 9 ? num.toString() : "0" + num
+ }
+
+ function time_f(t) {
+ return pad(t.getHours()) + ":" + pad(t.getMinutes())
}
function break_text(c, text, x, y, width) {
@@ -139,6 +142,8 @@ window.addEventListener("load", function() {
}
load_screenings(function() {
+ let ts = Date.now()
+
this.response.forEach(_add)
console.log("Screenings in " + screenings_by_date.size + " days: ")
@@ -186,5 +191,6 @@ window.addEventListener("load", function() {
draw_screenings(c, s, start_time, rooms)
}
+ console.log("Total elapsed time: " + (Date.now() - ts) + "ms.")
})
})