MCPcopy Index your code
hub / github.com/coder/coder / getMaxDeadlineChange

Function getMaxDeadlineChange

site/src/utils/schedule.tsx:225–228  ·  view source on GitHub ↗
(
	deadline: dayjs.Dayjs,
	extremeDeadline: dayjs.Dayjs,
)

Source from the content-addressed store, hash-verified

223 * @returns number, in hours
224 */
225export const getMaxDeadlineChange = (
226 deadline: dayjs.Dayjs,
227 extremeDeadline: dayjs.Dayjs,
228): number => Math.abs(deadline.diff(extremeDeadline, "hours"));
229
230export const validTime = (time: string): boolean => {
231 return /^[0-9][0-9]:[0-9][0-9]$/.test(time);

Callers 2

schedule.test.tsFile · 0.90
AutostopDisplayFunction · 0.90

Calls 1

diffMethod · 0.65

Tested by

no test coverage detected