fixes
This commit is contained in:
parent
f3a33309f7
commit
9365275467
12 changed files with 6 additions and 5 deletions
|
@ -443,7 +443,7 @@ Let's recap these methods to avoid any confusion:
|
|||
|
||||
| method | selects... | negatives |
|
||||
|--------|-----------|-----------|
|
||||
| `slice(start, end)` | from `start` to `end` | allows negatives |
|
||||
| `slice(start, end)` | from `start` to `end` (not including `end`) | allows negatives |
|
||||
| `substring(start, end)` | between `start` and `end` | negative values mean `0` |
|
||||
| `substr(start, length)` | from `start` get `length` characters | allows negative `start` |
|
||||
|
||||
|
|
|
@ -22,10 +22,11 @@ function getSecondsToTomorrow() {
|
|||
let hour = now.getHours();
|
||||
let minutes = now.getMinutes();
|
||||
let seconds = now.getSeconds();
|
||||
let totalSecondsToday = (hour * 60 + minutes) * 60 + seconds;
|
||||
let totalSecondsToday = (hour * 60 + minutes) * 60 + seconds;
|
||||
let totalSecondsInADay = 86400;
|
||||
|
||||
|
||||
return totalSecondsInADay - totalSecondsToday;
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
Please note that many countries have Daylight Savings Time (DST), so there may be days with 23 or 25 hours. We may want to treat such days separately.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue