function e(e){if(!e)return`—`;let t=Date.now()-new Date(e).getTime(),n=Math.floor(t/1e3);if(n<60)return`${n}s ago`;let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let i=Math.floor(r/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}function t(e){if(!e)return`—`;let t=Math.floor((new Date(e).getTime()-Date.now())/1e3);return t<=0?`now`:t<60?`in ${t}s`:t<3600?`in ${Math.floor(t/60)}m`:`in ${Math.floor(t/3600)}h`}export{e as n,t};