MCPcopy
hub / github.com/simstudioai/sim / extractTime

Function extractTime

packages/emcn/src/components/calendar/calendar.tsx:122–124  ·  view source on GitHub ↗

Reads the `HH:mm` slice from a `YYYY-MM-DDTHH:mm` value, or a fallback.

(value: string | Date | undefined, fallback: string)

Source from the content-addressed store, hash-verified

120
121/** Reads the `HH:mm` slice from a `YYYY-MM-DDTHH:mm` value, or a fallback. */
122function extractTime(value: string | Date | undefined, fallback: string): string {
123 return typeof value === 'string' && value.includes('T') ? value.slice(11, 16) : fallback
124}
125
126/**
127 * Orders a start/end pair and serializes the range bounds to the wire format.

Callers 1

RangeCalendarViewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected