diff --git a/src/main/angular/src/app/api/schedule/entry/ScheduleEntry.ts b/src/main/angular/src/app/api/schedule/entry/ScheduleEntry.ts index 5b1252e..0f2ce33 100644 --- a/src/main/angular/src/app/api/schedule/entry/ScheduleEntry.ts +++ b/src/main/angular/src/app/api/schedule/entry/ScheduleEntry.ts @@ -1,6 +1,10 @@ import {validateBooleanNotNull, validateDateAllowNull, validateNumberNotNull, validateStringNotEmptyNotNull} from "../../validators"; import {Timestamp} from "../../Timestamp"; +function getDaySeconds(date: Date): number { + return date.getHours() * 3600 + date.getMinutes() * 60 + date.getSeconds(); +} + export class ScheduleEntry { private constructor( @@ -61,7 +65,7 @@ export class ScheduleEntry { } else if (b.nextFuzzyTimestamp === null) { return -1; } - return a.nextFuzzyTimestamp.date.getTime() - b.nextFuzzyTimestamp.date.getTime(); + return getDaySeconds(a.nextFuzzyTimestamp.date) - getDaySeconds(b.nextFuzzyTimestamp.date); } }