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

Function calculateLatestProgramEnd

frontend/src/utils/guideUtils.js:185–191  ·  view source on GitHub ↗
(programs, defaultEnd)

Source from the content-addressed store, hash-verified

183};
184
185export const calculateLatestProgramEnd = (programs, defaultEnd) => {
186 if (!programs.length) return defaultEnd;
187 return programs.reduce((acc, p) => {
188 const e = initializeTime(p.end_time);
189 return isAfter(e, acc) ? e : acc;
190 }, defaultEnd);
191};
192
193export const calculateStart = (earliestProgramStart, defaultStart) => {
194 return isBefore(earliestProgramStart, defaultStart)

Callers 1

TVChannelGuideFunction · 0.90

Calls 2

initializeTimeFunction · 0.90
isAfterFunction · 0.90

Tested by

no test coverage detected