pimutils / khal

:calendar: CLI calendar application
https://lostpackets.de/khal/
MIT License
2.54k stars 198 forks source link

[opinionated feature request] khal list 30d should print events in the next 30 days #1277

Open tgy opened 1 year ago

tgy commented 1 year ago

I would expect khal list 30d to print events in the next 30 days.

With the current version of khal, you have to do:

khal list `date +%F` 30d

Currently khal list <something> is going to try to parse <something> as a starting date/datetime.

My proposal is that we first try to parse the starting date/datetime, and if it fails, we try to parse a timedelta (e.g. "30d" or "5h") instead.

Happy to open a PR for that, but I want this to be validated before I put any work into this.

Thanks!

geier commented 1 year ago

Have you tried khal list today 30d?But yes, your suggestion sounds sensible (to assume now or today as a starting date/time in only a range is given).Feel free to send a pr.Am 23.06.2023 um 11:21 schrieb Valentin Iovene @.***>: I would expect khal list 30d to print events in the next 30 days. With the current version of khal, you have to do: khal list date +%F 30d

Currently khal list is going to try to parse as a starting date/datetime. My proposal is that we first try to parse the starting date/datetime, and if it fails, we try to parse a timedelta (e.g. "30d" or "5h") instead. Happy to open a PR for that, but I want this to be validated before I put any work into this. Thanks!

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>