duration and repeat
I'm trying to put the logic together for this and it seems like I cant get no wh开发者_如何学Goere. 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
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.
精彩评论