I have a script that makes use of datetime in order to name files.Only business days (Mon - Fri) are used.Here is my part of the code that finds the last business day:lastBusDay = datetime.datetime.today()shift = datetime.timedelta(max(1,(lastBusDay.weekday() + 6) % 7 - 3))lastBusDay = lastBusDay - shiftyesterday = lastBusDay.strftime('%d%m%y')These variables are outside of any function and are the first part of my script after the imports. I've heard that global variables are bad, and I understand why.But does this fall under the same category?Only the yesterday variable is used later on in the script and is used to specify the new name in an the os.renames function.
Using datetime in order to name files
python;datetime