Calculate days of the week from Monday to Saturday
<p>In my form I have a datafield where I select the day of the week!
For example if I select today 23-03-2012 Friday, I need to get an array of days from previous Monday to this next Saturday.</p>

<p>array:</p>

<pre><code>[0],[19-03-2012],[Monday]
[1],[20-03-2012],[Monday]
[2],[21-03-2012],[Wednesday]
[3],[22-03-2012],[Monday]
[4],[23-03-2012],[Friday]
[5],[24-03-2012],[Saturday]
</code></pre>

<p>How can i do it for any selected day of the week obviously paying attention to changes?
Thanks</p>
