Filter with hour and minutes
<p>I want to filter the moment of a day only with hour and minutes.</p>

<p>For example, a function that return true if now is between the 9.15 and 11.20 of the day.</p>

<p>I tried with datetime but with the minutes is littlebit complicated.</p>

<pre><code>#!/usr/bin/python

import datetime

n = datetime.datetime.now()
sta = datetime.time(19,18)
sto = datetime.time(20,19)

if sta.hour &lt;= n.hour and n.hour &lt;= sto.hour:
       if sta.minute &lt;= n.minute and sto.minute &lt;= n.minute:
               print str(n.hour) + ":" + str(n.minute)
</code></pre>

<p>What is the best way?</p>

<p>Regards</p>