mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-14 20:03:52 +00:00
refactor: recover day after indicator
This commit is contained in:
committed by
Carlos Valente
parent
4069038ed5
commit
eb2c4d0780
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Utility function checks whether a given event is the day after from its predecessor
|
||||
* We consider an event to be the day after, if it begins before the start of the previous
|
||||
* @example day after
|
||||
* 09:00 - 10:00
|
||||
* 08:00 - 10:30
|
||||
* @example same day
|
||||
* 09:00 - 10:00
|
||||
* 09:30 - 10:30
|
||||
*/
|
||||
export function checkIsNextDay(previousStart: number, timeStart: number): boolean {
|
||||
return timeStart <= previousStart;
|
||||
}
|
||||
Reference in New Issue
Block a user