From 554ed05106fa29f6ea09565f68bce8698710b422 Mon Sep 17 00:00:00 2001 From: Beau Raines Date: Tue, 17 Oct 2023 10:27:37 -0700 Subject: [PATCH] feat(ls): - improves ls display for running events If there is a running entry, `ls` would show `Invalid date`. This improves that to show that it is currently running. Fixes #92 --- cmds/ls.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmds/ls.mjs b/cmds/ls.mjs index 78d2975..9315c06 100644 --- a/cmds/ls.mjs +++ b/cmds/ls.mjs @@ -43,7 +43,7 @@ export const handler = async function (argv) { project: projects.filter(p => p.id == element.project_id)[0]?.name, project_id: projects.filter(p => p.id == element.project_id)[0]?.id, start: convertUtcTime(element.start), - stop: convertUtcTime(element.stop), + stop: convertUtcTime(element.stop) == 'Invalid Date' ? 'Currently Running' : convertUtcTime(element.stop), duration: formatDuration(element.duration * 1000), id: element.id }