@fntio/infra-client
Version:
Self-hosted AWS access portal: credential vending, target-account trust, and grant-driven private networking as CDK stacks and constructs.
2 lines (1 loc) • 312 B
JavaScript
function a(r){if(!r)return"";let e=new Date(r).getTime();if(Number.isNaN(e))return"";let t=Math.floor((Date.now()-e)/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;let n=Math.floor(t/60);if(n<24)return`${n}h ago`;let o=Math.floor(n/24);return o<=7?`${o}d ago`:new Date(r).toLocaleDateString()}export{a};