function t(t,e){const n=new Date(t),o=new Date(e),a=Math.abs(n.getTime()-o.getTime());return Math.floor(a/864e5)}function e(t,e=new Date){const n=new Date(t).getTime(),o=new Date(e).getTime();let a=Math.abs(o-n);if(a<1e3)return"0秒";const s=6e4,r=36e5,h=24*r,u=30*h,c=365*h,f=Math.floor(a/c);a-=f*c;const i=Math.floor(a/u);a-=i*u;const l=Math.floor(a/h);a-=l*h;const M=Math.floor(a/r);a-=M*r;const g=Math.floor(a/s);a-=g*s;const p=Math.floor(a/1e3),D=[];return f>0&&D.push(f+"年"),i>0&&D.push(i+"个月"),l>0&&D.push(l+"天"),M>0&&D.push(M+"小时"),g>0&&D.push(g+"分钟"),p>0&&0===D.length&&D.push(p+"秒"),D.join("")}function n(t){return["周一","周二","周三","周四","周五","周六","周日"][t-1]||""}function o(t){return["星期一","星期二","星期三","星期四","星期五","星期六","星期日"][t-1]||""}const a=(t=7)=>{const e=[];for(let n=t-1;n>=0;n--)e.push(new Date((new Date).getTime()-24*n*60*60*1e3).toLocaleDateString());return e};export{n as a,t as d,e as f,a as g,o as n};
