function l(e,a,n=5){if(!e||!a)return[];const t=new Date(a);if(Number.isNaN(t.getTime()))return[];const o=Math.max(1,Math.floor(e.interval??1)),r=e.until?new Date(e.until).getTime():void 0,u=Math.min(n,e.count??n),s=[];let c=t;for(let i=0;i<u&&(c=T(c,e.freq,o),!(r!=null&&c.getTime()>r));i++)s.push(c.toISOString());return s}function T(e,a,n){const t=new Date(e.getTime());switch(a){case"daily":t.setUTCDate(t.getUTCDate()+n);break;case"weekly":t.setUTCDate(t.getUTCDate()+7*n);break;case"monthly":t.setUTCMonth(t.getUTCMonth()+n);break;case"yearly":t.setUTCFullYear(t.getUTCFullYear()+n);break}return t}export{l as nextOccurrences};
//# sourceMappingURL=recurrence-CSNQqrpX.js.map
