function addBusinessDay( dt:Date, bizDay ){ var counter = 1; // set to 1 to count from next business day var dtRet = new Date(); dtRet.setTime(dt.getTime()); while( bizDay>0 ){ var tmp = new Date(); tmp.setTime(dt.getTime()); tmp.setDate( tmp.getDate() + counter++ ); switch( tmp.getDay() ){ case 0: case 6: break;// sunday & saturday default: bizDay--; break; }; } dtRet.setDate( dtRet.getDate() + (counter-1) ); return dtRet; }