How to calculate the certain time period?

If i want to calculate who visited to white house each month the most, how to do it? Thank you in advance !

I think you should be able to use datetime.timedelta() function to do arithmetic operations on amounts of time.
Here’s a tutorial that explains it more thoroughly.