summaryrefslogtreecommitdiff
path: root/fracture
diff options
context:
space:
mode:
authorEkaitz Zarraga <ekaitz@elenq.tech>2020-08-06 00:31:31 +0200
committerEkaitz Zarraga <ekaitz@elenq.tech>2020-08-06 00:31:31 +0200
commita6ae3c7207ce8b35cea734734a28d2ff11e7d859 (patch)
treeee6563e7f782efb8ba61cceb148ce7277e0dbe93 /fracture
parent5e37e877c1d4181a1ed54552875cec6af6abaa91 (diff)
Set default date to today
Diffstat (limited to 'fracture')
-rw-r--r--fracture/__main__.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/fracture/__main__.py b/fracture/__main__.py
index 822cf96..d0305ab 100644
--- a/fracture/__main__.py
+++ b/fracture/__main__.py
@@ -1,6 +1,7 @@
from invoice import Invoice, Tax
import db
+import datetime
from functools import wraps
from argparse import ArgumentParser as ap
import tempfile
@@ -140,6 +141,7 @@ if __name__ == "__main__":
summary_parser.add_argument("--quarter", type=int,
help="Obtain the summary of the quarter")
summary_parser.add_argument("--year", type=int,
+ default=datetime.datetime.now().year,
help="Obtain the summary of the year")
summary_parser.set_defaults(func=summarize)