MCPcopy
hub / github.com/vercel-labs/just-bash / get

Function get

packages/just-bash/src/commands/date/date.ts:52–52  ·  view source on GitHub ↗
(t: string)

Source from the content-addressed store, hash-verified

50 hour12: false,
51 }).formatToParts(d);
52 const get = (t: string) => parts.find((p) => p.type === t)?.value ?? "00";
53 const h = Number.parseInt(get("hour"), 10) % 24;
54 const shown = new Date(
55 `${get("year")}-${get("month")}-${get("day")}T${String(h).padStart(2, "0")}:${get("minute")}:${get("second")}Z`,

Callers 1

tzShownAsUtcFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected