From f5afc023f74eeed41307375acf9079b9d8dd470d Mon Sep 17 00:00:00 2001 From: det-fys Date: Fri, 13 Nov 2020 18:32:13 +0100 Subject: [PATCH] Update app.js --- app.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index 89ac040..26b65b5 100644 --- a/app.js +++ b/app.js @@ -31,8 +31,12 @@ function vypocitatCas(vojsl) { let min = d.getMinutes(); if (min > 25 && min < 55) { min = 0; - hod = hod == 23 ? 0 : hod + 1; - c = new Date(c.getDate() + 1); + if (hod == 23) { + hod = 0; + c = new Date(c.getDate() + 1); + } else { + hod++; + } } else { min = 30; }