Currently, there is a string variable with the value “12:00”.
I’m trying to make it return True if it is before 12:00 and False if it is after 12:00 by comparing it to the current time, but I can’t find how to apply it to a time type variable from the above text.
Also, if the variable change to “11:30” instead of “12:00”, it should be able to judge around 11:30, and if it says “13:00”, it should be able to judge around 13:00, so I can’t find a way to make it work dynamically.
Therefore, I would like to know the following three things.
1、How to apply “12:00” to today’s 12:00.
2、How to judge whether it is before or after 12:00 by comparing it with the current time.
3,If “12:00” is changed to “11:30” or “13:00”, how to judge whether it is before or after the changed time.
Thank you for reading