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

Function validTime

site/src/utils/schedule.tsx:230–232  ·  view source on GitHub ↗
(time: string)

Source from the content-addressed store, hash-verified

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);
232};
233
234export const timeToCron = (time: string, tz?: string) => {
235 if (!validTime(time)) {

Callers 3

ScheduleForm.tsxFile · 0.90
timeToCronFunction · 0.85
quietHoursDisplayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected