add accumulation of captured time
This commit is contained in:
@@ -27,4 +27,8 @@ def create_parser():
|
||||
parser_end = subparsers.add_parser("end", help="Ending the current event.")
|
||||
parser_end.add_argument("-e", "--end", help="End datetime")
|
||||
|
||||
# Create the parser for the "acc" command
|
||||
parser_end = subparsers.add_parser("acc", help="Accumulate the duration of events.")
|
||||
parser_end.add_argument("query", help="The regex matching for the name of the event.")
|
||||
|
||||
return parser
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from datetime import datetime as dt
|
||||
|
||||
|
||||
def datetime(s: str) -> dt:
|
||||
def str_to_datetime(s: str) -> dt:
|
||||
s = s.strip()
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user