title: How to get all datetime instances of the current week, given a day?
body: <p>Given a day, I want to get all days(datetime instances) of the week in which day is present.</p>
  
  <p>I have a solution, please correct me if there is something wrong of if more efficient method exists.</p>
  
  <pre><code>&gt;&gt;&gt; import datetime
  &gt;&gt;&gt; today = datetime.datetime(2013, 06, 26)
  &gt;&gt;&gt; today
  datetime.datetime(2013, 6, 26, 0, 0)
  &gt;&gt;&gt; day_of_week = today.isocalendar()[2] - 1
  &gt;&gt;&gt; day_of_week
  2
  &gt;&gt;&gt; start_date = today - timedelta(days=day_of_week)
  &gt;&gt;&gt; start_date
  datetime.datetime(2013, 6, 24, 0, 0) # Got monday
  &gt;&gt;&gt; dates = [start + timedelta(days=i) for i in range(7)]
  &gt;&gt;&gt; dates
  [datetime.datetime(2013, 6, 24, 0, 0),
   datetime.datetime(2013, 6, 25, 0, 0),
   datetime.datetime(2013, 6, 26, 0, 0),
   datetime.datetime(2013, 6, 27, 0, 0),
   datetime.datetime(2013, 6, 28, 0, 0),
   datetime.datetime(2013, 6, 29, 0, 0),
   datetime.datetime(2013, 6, 30, 0, 0)]
  </code></pre>
  
  <p>I want monday to be start date and sunday the end date.</p>