views:

79

answers:

1

Hi all,

I'm trying to put the logic together for this and it seems like I cant get no where. I have my repeat all set depending on week(s). But what about duration? Let's say someone is schedule for 2 days (duration) for every week (repeat). How would I put this together depending on two given dates?

http://jsbin.com/usori3/15/edit

A: 

Hopefully this page will have all the answers Javascript date object. You can add days to a date to get a new date (2 days for your schedule) then add another 5 days (to complete the week) to start the repeat. Compare that date to your end date to see if you've finished. As Daniels says in the comments, it would be good if you could be a little more specific, but I hope that answers your question or at least points you in the right direction. It may even be worth looking at JQUERY to see if there's a plug in for the date handling that may help you further.

Paul Hadfield
@ Paul Hadfield -- thanks for the input Paul, you've put me on the right track and I was able to resolve this issue.
hersh
Glad I've pointed you in the right direction. If my answer really did help you, can you please accept my answer, thanks.
Paul Hadfield