events with 0 duration dose not contribute to next day calculation (#1099)

This commit is contained in:
Alex Christoffer Rasmussen
2024-06-23 22:06:44 +02:00
committed by GitHub
parent 1b448835cd
commit 975356f4f4
3 changed files with 19 additions and 3 deletions
@@ -8,6 +8,6 @@
* 09:00 - 10:00
* 09:30 - 10:30
*/
export function checkIsNextDay(previousStart: number, timeStart: number): boolean {
return timeStart <= previousStart;
export function checkIsNextDay(previousStart: number, timeStart: number, previousDuration?: number): boolean {
return previousDuration === 0 ? false : timeStart <= previousStart;
}