Example code:
from datetime import datetime, date
from dateutil.relativedelta import relativedelta
import time
timestamp = 1620013967000
cunix = int(time.time())
ounix = timestamp / 1000
outc_time = datetime.utcfromtimestamp(ounix)
cutc_time = datetime.utcfromtimestamp(cunix)
#time_diff = cutc_time - outc_time
if condition == met:
if(outc_time + relativedelta(months=+6) - cutc_time) >= 1: # This doesn't work but I'm trying to give an idea of what I would like to accomplish.
do_stuff()
An example of the output I'm getting currently with these variables:
143 days, 6:53:04
162 days, 11:42:26
122 days, 19:31:56
131 days, 20:38:03
6 days, 21:03:03
12 days, 3:41:45
159 days, 5:48:15
159 days, 14:37:54
50 days, 0:04:41
153 days, 13:43:03
Basically what I want is an idea on how to make a condition where it'll only proceed if the difference in days is equal to or less than 1. I'm a little lost on how to do it currently. Any help is appreciated.