title: Rounding dates in Python
body: <p>Say I am looking at a particular date:</p>
  
  <pre><code>from datetime import date, timedelta
  days_to_substract = 65
  my_date = date.today()-timedelta(days=days_to_subtract)
  </code></pre>
  
  <p>How can I find:</p>
  
  <ol>
  <li>The date of the <code>Monday</code> right before <code>my_date</code> (if <code>my_date</code> isn't a Monday)</li>
  <li>The date of the closest <code>Monday</code> to <code>my_date</code></li>
  </ol>
  
  <p>Is there a way to round dates in <code>datetime</code>?</p>