I want to be able to extract the hour value of each function so I can create a if statement like so:

if hour >= 9 and hour <= 21:
some code happens..

Edit: I Don't know why I got so many downvotes, I didn't know about that attribute, new to Python and just trying to learn like everyone else. Really enjoy this community but sometimes it can be a little harsh for a beginner. Thank you for everyone that helped! I will use the .hour attribute.