Skip to content

Commit

Permalink
Implemented 'beginning of tomorrow'
Browse files Browse the repository at this point in the history
  • Loading branch information
gizmocuz authored and dirkjanfaber committed Aug 22, 2024
1 parent 79e9a34 commit 02900b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/nodes/vrm-api.html
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@
<option value="-86400">-24 hours</option>
<option value="boy">beginning of yesterday</option>
<option value="bod">beginning of day</option>
<option value="bot">beginning of tomorrow</option>
<option selected="selected" value="0">now</option>
</select>
</div>
Expand Down
3 changes: 3 additions & 0 deletions src/nodes/vrm-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ module.exports = function (RED) {
} else if (start === 'bod') {
start = (dayStart - hourStart) / 1000
}
} else if (start === 'bot') {
start = (dayStart - hourStart + 86400000) / 1000
}
parameters.start = Math.floor((hourStart / 1000) + Number(start))
}
if (config.stats_end !== 'undefined') {
Expand Down

0 comments on commit 02900b2

Please sign in to comment.