30 lines
701 B
Python
Executable File
30 lines
701 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
"""
|
|
Calculates the number of actual days since everyone
|
|
went into hiding (quarantine).
|
|
"""
|
|
|
|
import argparse
|
|
import datetime
|
|
import dateutil.parser
|
|
import color
|
|
|
|
|
|
quarantine_start_date = "13 Mar 2020"
|
|
|
|
def parse_args():
|
|
argp = argparse.ArgumentParser()
|
|
return argp.parse_args()
|
|
|
|
def quarantine_days(quarantine_start_date=quarantine_start_date):
|
|
q_count = datetime.datetime.now() - dateutil.parser.parse(quarantine_start_date)
|
|
return q_count.days
|
|
|
|
|
|
if __name__ == "__main__":
|
|
# args = parse_args()
|
|
print(f"\nQuarantine Start Date: {color.yellow(quarantine_start_date)}")
|
|
print(f"Quarantine Days: {color.red(quarantine_days(quarantine_start_date))}")
|
|
|