I want to 'classify' timestamps to either A or B, where A and B are sets of timeframes. More specifically, I have a few dates in the following format '2014-11-23T12:00:00.000+04:00'. What I would like to do is to find whether each of them 'belongs' either to set [between 11 and 16 on Monday or 11 and 16 Tuesday] or to set [between 11 Saturday to 16 on Sunday] or to non of these sets. Any ideas how to implement this in Python?
EDIT:
The following code works fine for the provided date string, however, it is not complied with my date string as I use a slightly different format (i.e. '2014-11-23T12:00:00.000+04:00')
from datetime import datetime
new_time = datetime.strptime('2012-03-01T10:00:00Z','%Y-%m-%dT%H:%M:%SZ')
print(new_time)