function r(n){const e=new Date,o=new Date(n);if(isNaN(o.getTime()))return"Tanggal tidak valid";const s=(o.getTime()-e.getTime())/1e3,i=[{name:"tahun",seconds:31536e3},{name:"bulan",seconds:2592e3},{name:"hari",seconds:86400},{name:"jam",seconds:3600},{name:"menit",seconds:60},{name:"detik",seconds:1}];for(const a of i){const t=Math.floor(Math.abs(s)/a.seconds);if(t>=1)return s>0?`dalam ${t} ${a.name}`:`${t} ${a.name} yang lalu`}return"baru saja"}function d(n){const e=new Date(n);return isNaN(e.getTime())?"Tanggal tidak valid":e.toLocaleDateString("id-ID",{weekday:"long",year:"numeric",month:"long",day:"numeric"})}export{d as f,r as w};
