import{h as t}from"./moment.BD7_iMEL.js";var m=(t=>(t[t["周日"]=0]="周日",t[t["周一"]=1]="周一",t[t["周二"]=2]="周二",t[t["周三"]=3]="周三",t[t["周四"]=4]="周四",t[t["周五"]=5]="周五",t[t["周六"]=6]="周六",t))(m||{});const r=r=>{const a=t(r).day();return t(r).format("YYYY/MM/DD")===t(new Date).format("YYYY/MM/DD")?"今天":m[a]},a=(m,a)=>{let Y="";const f=t(m).format("YYYY/MM/DD"),o=t(a).format("YYYY/MM/DD"),s=t(m).format("YYYY"),M=t(a).format("YYYY");return Y=f===o?`${t(m).format("MM/DD")} (${r(m)}) ${t(m).format("HH:mm")} — ${t(a).format("HH:mm")}`:s==M?`${t(m).format("MM/DD")} (${r(m)}) ${t(m).format("HH:mm:ss")} — ${t(a).format("MM/DD")} (${r(a)}) ${t(a).format("HH:mm:ss")}`:`${t(m).format("YYY/MM/DD HH:mm:ss")}  — ${t(a).format("YYY/MM/DD HH:mm:ss")}`,Y},Y=(m,r=!1)=>{const a=t(m),Y=t().isBefore(a)?"后":"前",f=Math.abs(t().diff(a,"seconds"));if(f<60)return`${f}秒${Y}`;const o=Math.abs(t().diff(a,"minutes"));if(o<60)return`${o}分钟${Y}`;const s=Math.abs(t().diff(a,"hours"));if(s<24)return`${s}小时${Y}`;const M=Math.abs(t().diff(a,"days")),D=t(m).isSame(new Date,"year");return M<=3?`${M}天${Y}`:M>3&&D?r?a.format("MM/DD HH:mm"):a.format("MM/DD"):a.format("YYYY/MM/DD")};export{Y as f,a as g};
