MCPcopy Create free account
hub / github.com/dmno-dev/bumpy / p

Function p

packages/bumpy/src/core/snapshot.ts:58–58  ·  view source on GitHub ↗
(n: number, len = 2)

Source from the content-addressed store, hash-verified

56/** Compact UTC timestamp `YYYYMMDDHHmmss` (numeric, stable-sorting) */
57function utcTimestamp(date: Date): string {
58 const p = (n: number, len = 2) => String(n).padStart(len, '0');
59 return (
60 `${p(date.getUTCFullYear(), 4)}${p(date.getUTCMonth() + 1)}${p(date.getUTCDate())}` +
61 `${p(date.getUTCHours())}${p(date.getUTCMinutes())}${p(date.getUTCSeconds())}`

Callers 1

utcTimestampFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected