MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / generateTimeOptions

Function generateTimeOptions

apps/start/src/modals/date-time-picker.tsx:55–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

53
54 // Generate all time options with 5-minute intervals
55 const generateTimeOptions = () => {
56 const times = [];
57 for (let hour = 0; hour < 24; hour++) {
58 for (let minute = 0; minute < 60; minute += 5) {
59 const timeString = `${hour.toString().padStart(2, '0')}:${minute.toString().padStart(2, '0')}`;
60 const displayTime = format(new Date(2000, 0, 1, hour, minute), 'HH:mm');
61 times.push({ value: timeString, label: displayTime });
62 }
63 }
64 return times;
65 };
66
67 const timeOptions = generateTimeOptions();
68

Callers 1

DateTimePickerFunction · 0.85

Calls 3

formatFunction · 0.85
toStringMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected