MCPcopy Create free account
hub / github.com/darkreader/darkreader / compareTime

Function compareTime

src/utils/time.ts:30–38  ·  view source on GitHub ↗
(time1: number[], time2: number[])

Source from the content-addressed store, hash-verified

28}
29
30function compareTime(time1: number[], time2: number[]): -1 | 0 | 1 {
31 if (time1[0] === time2[0] && time1[1] === time2[1]) {
32 return 0;
33 }
34 if (time1[0] < time2[0] || (time1[0] === time2[0] && time1[1] < time2[1])) {
35 return -1;
36 }
37 return 1;
38}
39
40export function nextTimeInterval(time0: string, time1: string, date: Date = new Date()): number | null {
41 const a = parse24HTime(time0);

Callers 2

nextTimeIntervalFunction · 0.85
isInTimeIntervalLocalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…