View Single Post
  #2 (permalink)  
Old October 7th, 2004, 06:23 AM
Santhi Santhi is offline
Friend of Wrox
 
Join Date: Oct 2003
Location: Chennai, TamilNadu, India.
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default

Here is the code...

function DayCount()
{
   var d1 = new Date(2004,09,29);
   var d2 = new Date(2004,10,05);
   var flag=true;
   var day,daycount=0;
   while(flag)
   {
      day=d1.getDay();
      if(day != 0 && day != 6)
         daycount++;
      d1.setDate(d1.getDate()+1) ;
      if(d1.getDate() == d2.getDate() &&
                  d1.getMonth()== d2.getMonth())
      {
          flag=false;
      }
 }
document.write("Work Day COunt"+daycount);
}

Reply With Quote