mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-17 05:13:32 +00:00
fix: handle multiple days
This commit is contained in:
committed by
Carlos Valente
parent
f8ca5b9cef
commit
db8ed93d41
@@ -24,8 +24,9 @@ export function checkIsNextDay(previousStart: number, timeStart: number, previou
|
||||
return false;
|
||||
}
|
||||
|
||||
if (timeStart <= previousStart) {
|
||||
const normalisedPreviousEnd = previousStart + previousDuration;
|
||||
const cappedStart = previousStart % dayInMs;
|
||||
if (timeStart <= cappedStart) {
|
||||
const normalisedPreviousEnd = cappedStart + previousDuration;
|
||||
if (normalisedPreviousEnd === dayInMs) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user