MCPcopy Create free account
hub / github.com/Dispatcharr/Dispatcharr / calculateEarliestProgramStart

Function calculateEarliestProgramStart

frontend/src/utils/guideUtils.js:177–183  ·  view source on GitHub ↗
(programs, defaultStart)

Source from the content-addressed store, hash-verified

175};
176
177export const calculateEarliestProgramStart = (programs, defaultStart) => {
178 if (!programs.length) return defaultStart;
179 return programs.reduce((acc, p) => {
180 const s = initializeTime(p.start_time);
181 return isBefore(s, acc) ? s : acc;
182 }, defaultStart);
183};
184
185export const calculateLatestProgramEnd = (programs, defaultEnd) => {
186 if (!programs.length) return defaultEnd;

Callers 1

TVChannelGuideFunction · 0.90

Calls 2

initializeTimeFunction · 0.90
isBeforeFunction · 0.90

Tested by

no test coverage detected