Horje
check how many days old file is python Code Example
check how many days old file is python
>>> import datetime
>>> today = datetime.datetime.today()
>>> modified_date = datetime.datetime.fromtimestamp(os.path.getmtime('yourfile'))
>>> duration = today - modified_date
>>> duration.days > 90 # approximation again. there is no direct support for months.
True




Python

Related
double underscore methods python Code Example double underscore methods python Code Example
selenium screenshot python user agent Code Example selenium screenshot python user agent Code Example
wand image resize Code Example wand image resize Code Example
discord.py say something Code Example discord.py say something Code Example
pprint don't sort Code Example pprint don't sort Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7