Hi I am trying to compare the last seen time of a user to now using flask-moment. Here is the logic:
user.last_seen = 3 mins ago #I already know how to get this using flask-moment
time_now = 5:00 pm
My goal is to do this:
{% if (time_now - user.last_seen) <= 5 mins %}
...do something...
{% else %}
...do other thing ....
{% endif %}
Both times are variable. I am able to get the two times but I don't know how to compare them like I did above. Your help will be much appreciated.