I see that date comparisons can be done and there’s also datetime.timedelta(), but I’m struggling to find out how to check if the current time (datetime.datetime.now()) is earlier, later or the same than a specified time (e.g. 8am) regardless of the date.
I see that date comparisons can be done and there’s also datetime.timedelta() , but
Share
You can’t compare a specific point in time (such as “right now”) against an unfixed, recurring event (8am happens every day).
You can check if now is before or after today’s 8am: