MCPcopy
hub / github.com/di-sukharev/opencommit / formatCacheAge

Function formatCacheAge

out/cli.cjs:86529–86540  ·  view source on GitHub ↗
(timestamp)

Source from the content-addressed store, hash-verified

86527 validate: (value) => {
86528 if (!value || value.trim().length === 0) {
86529 return "API key is required";
86530 }
86531 return void 0;
86532 }
86533 });
86534}
86535function formatCacheAge(timestamp) {
86536 if (!timestamp) return "";
86537 const ageMs = Date.now() - timestamp;
86538 const days = Math.floor(ageMs / (1e3 * 60 * 60 * 24));
86539 const hours = Math.floor(ageMs / (1e3 * 60 * 60));
86540 if (days > 0) {
86541 return `${days} day${days === 1 ? "" : "s"} ago`;
86542 } else if (hours > 0) {
86543 return `${hours} hour${hours === 1 ? "" : "s"} ago`;

Callers 1

selectModelFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…