I need a javascript function that returns the Saturday of the week for a given week day. Example if I input 2/5/2010 I get 2/6/2010 or if I put 2/10/2010 I get 2/13/2010
[CODE]function getNextSaturdayinUSformatFromUSformat(datestring){ var d= new Date(Date.parse(datestring)), wd= d.getDay(), n=(wd)? (wd== 6? 7: 6-wd): 6; d.setDate(d.getDate()+n); return [d.getMonth()+1, d.getDate(), d.getFullYear()].join('/'); }[/CODE]
Help @steppinthrax spread the word by sharing this article on Twitter...