aboutsummaryrefslogtreecommitdiff
path: root/cmd/x/mi.go
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2024-10-18 11:39:26 -0400
committerXe Iaso <me@xeiaso.net>2024-10-18 11:39:31 -0400
commit88d8a45b4be34f4b412fb83d147606bb1fbdeb87 (patch)
treead7eecfea9fa3775922a50a4578d993ab2186268 /cmd/x/mi.go
parentb946025fdc97e77d03c1f54f54cbdf1eb33bae4b (diff)
downloadx-88d8a45b4be34f4b412fb83d147606bb1fbdeb87.tar.xz
x-88d8a45b4be34f4b412fb83d147606bb1fbdeb87.zip
cmd/x: assume event end date to be the same as the start date
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'cmd/x/mi.go')
-rw-r--r--cmd/x/mi.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/x/mi.go b/cmd/x/mi.go
index 681be6b..05d917e 100644
--- a/cmd/x/mi.go
+++ b/cmd/x/mi.go
@@ -244,6 +244,10 @@ func (ae *miAddEvent) Execute(ctx context.Context, f *flag.FlagSet, _ ...interfa
return nil
})
+ if ae.endDate == "" {
+ ae.endDate = ae.startDate
+ }
+
_, err := time.Parse("2006-01-02", ae.endDate)
if err != nil {
fmt.Printf("error parsing date: %v\n", err)