Date range of current week, month, year. Python/Flask
<p>I have a datefield (created_on) on a data model that I am trying to filter queries by. I am trying to filter by <strong>current</strong> week, month, year. This is not to be confused with a week ago , month ago, in the last year. (not taking todays date and subtracting X daterange/timedelta to get last 7, 31, 365 days worth)</p>

<p>For Example:</p>

<p><strong>Current Week:</strong> If its Wednesday the 7th, then I want to filter from Monday 5th - Sunday 11th.. </p>

<p><strong>Current Month</strong> If its Feb 16th, I want to filter by February 1st - February 29th.</p>

<p><strong>Current Year</strong> If its March 3rd 2016, I want to filter from January 1st 2016 - December 31st 2016.</p>

<p>Phonetic Example:</p>

<pre><code>.filter(Table.created_on BETWEEN FIRST AND LAST DAY OF THIS WEEK/MONTH/YEAR)
</code></pre>