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

Function utcTimestamp

packages/bumpy/src/core/snapshot.ts:57–63  ·  view source on GitHub ↗

Compact UTC timestamp `YYYYMMDDHHmmss` (numeric, stable-sorting)

(date: Date)

Source from the content-addressed store, hash-verified

55
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())}`
62 );
63}
64
65/**
66 * Resolve a snapshot request: sanitize the name, pick the dist-tag, and compute the

Callers 1

resolveSnapshotFunction · 0.85

Calls 1

pFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…