add accumulation of captured time

This commit is contained in:
2025-11-13 19:04:55 +01:00
parent a54b19b938
commit 0e48ce265c
5 changed files with 26 additions and 4 deletions

View File

@@ -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

View File

@@ -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: