Adjusted wording and fixed for midnight goal
This commit is contained in:
parent
9ad3ca5a88
commit
a909aee7a1
1 changed files with 5 additions and 5 deletions
10
index.html
10
index.html
|
@ -145,7 +145,7 @@
|
|||
<div id="sleep"></div>
|
||||
|
||||
<div id="sleep-streak">
|
||||
Going to bed before 10pm
|
||||
Going to bed before midnight
|
||||
<br />
|
||||
<i id="day-7" class="bi"></i>
|
||||
<i id="day-6" class="bi"></i>
|
||||
|
@ -210,18 +210,18 @@
|
|||
|
||||
const hours = Math.floor(totalSeconds / 3600);
|
||||
if (hours > 24) {
|
||||
return "over a day";
|
||||
return "Over a day";
|
||||
} else if (hours > 0) {
|
||||
return hours + " hours remaining";
|
||||
return "More than " + hours + " hours remaining";
|
||||
}
|
||||
|
||||
const minutes = Math.floor((totalSeconds - (hours * 3600)) / 60);
|
||||
if (minutes > 0) {
|
||||
return minutes + " minutes remaining";
|
||||
return "More than " + minutes + " minutes remaining";
|
||||
}
|
||||
|
||||
const seconds = totalSeconds - (hours * 3600) - (minutes * 60);
|
||||
return seconds + " seconds remaining";
|
||||
return "More than " + seconds + " seconds remaining";
|
||||
}
|
||||
|
||||
function updateStatus() {
|
||||
|
|
Loading…
Reference in a new issue