Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] Add 10 working days.


  • From: javascript@xxxxxxxxxx (Andrew Dunn)
  • Subject: [Javascript] Add 10 working days.
  • Date: Wed, 25 Sep 2002 11:13:04 +1000

I need to add 10 working days to a date the user enters in to a text box. At
the moment I'm using this function:

function addDays(myDate,days) {
			return new Date(myDate.getTime() +
days*24*60*60*1000);
		}

This adds the number of days, but it doesn't exclude weekends. Anyone have
any suggestions for this?

Thanks.