const e=e=>{const t=e.getMonth();const a=e.getFullYear();const n=new Date(a,t+1,0).getDate();return Array.from({length:n},((e,n)=>new Date(a,t,n+1)))};const t=e=>{const t=new Date(e.getFullYear(),e.getMonth(),1).getDay();const a=new Date(e.getFullYear(),e.getMonth(),0);const n=[];for(let e=0;e<t;e++){n.unshift(new Date(a.getFullYear(),a.getMonth(),a.getDate()-e))}return n};const a=e=>{const t=new Date(e.getFullYear(),e.getMonth()+1,0).getDay();const a=new Date(e.getFullYear(),e.getMonth()+1,1);const n=[];for(let e=0;e<6-t;e++){n.push(new Date(a.getFullYear(),a.getMonth(),a.getDate()+e))}return n};const n=e=>{const t=/^(0?[1-9]|[12][0-9]|3[01])\/(0?[1-9]|1[0-2])\/\d{4}$/;if(!t.test(e))return false;const[a,n,s]=e.split("/").map(Number);const o=new Date(s,n-1,a);return o.getDate()===a&&o.getMonth()===n-1&&o.getFullYear()===s};const s=e=>{const t=e.getDate();const a=e.getMonth()+1;const n=e.getFullYear();return`${t}/${a}/${n}`};const o=new Date;const r=new Date(o);r.setDate(r.getDate()-1);const D=new Date(o);D.setHours(0,0,0,0);const c=new Date(o);c.setHours(23,59,59,999);const l=new Date(r);l.setHours(0,0,0,0);const w=new Date(r);w.setHours(23,59,59,999);const d=new Date(o);d.setDate(o.getDate()-o.getDay());const u=new Date(o);u.setDate(o.getDate()+(6-o.getDay()));const b=new Date(d);b.setDate(d.getDate()-7);const g=new Date(u);g.setDate(u.getDate()-7);const i=new Date(o);i.setDate(1);const y=new Date(o);y.setMonth(y.getMonth()+1,0);const f=new Date(i);f.setMonth(f.getMonth()-1,1);const h=new Date(i);h.setDate(h.getDate()-1);const L=new Date(i);L.setMonth(L.getMonth()-3,1);const M=new Date(i);M.setDate(M.getDate()-1);const $=new Date(o);$.setDate($.getDate()-6);const m=new Date(o);m.setDate(m.getDate()-29);const v=new Date(o);v.setDate(v.getDate()-89);const p=[{label:"Today",range:()=>({startDate:D,endDate:c})},{label:"Yesterday",range:()=>({startDate:l,endDate:w})},{label:"This Week",range:()=>({startDate:d,endDate:u})},{label:"Last Week",range:()=>({startDate:b,endDate:g})},{label:"This Month",range:()=>({startDate:i,endDate:y})},{label:"Last Month",range:()=>({startDate:f,endDate:h})},{label:"Last 3 Months",range:()=>({startDate:L,endDate:M})},{label:"Last 7 Days",range:()=>({startDate:$,endDate:c})},{label:"Last 30 Days",range:()=>({startDate:m,endDate:c})},{label:"Last 90 Days",range:()=>({startDate:v,endDate:c})}];function A(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}const J=e=>{const t=/^(?:January|February|March|April|May|June|July|August|September|October|November|December) (?:0?[1-9]|[12][0-9]|3[01]), (?:19|20)\d{2}$/;if(t.test(e)){console.log("date is valid");return true}else{console.log("date is not valid");return false}};export{e as a,a as b,A as c,p as d,s as f,t as g,n as i,J as v};
//# sourceMappingURL=p-672b8858.js.map