Open amandabee opened 6 years ago
Good suggestions!
I second this, I already lost quite some time to figure out how to list events from lets say June last year. Please include more examples in the documentation, including hints how to specify date ranges. Thanks !
So I see 3 possible places for better documentation regarding date ranges:
khal list --help
khal list 2017-06
breaksAlso, could you explain what is the correct format for khal datetime range. I know it uses the python strtime but I don't know how that works for a range. The documentation doesn't reall go into detail on this. I am simply trying to edit a start time for an event
@Aerex if you haven't set the time format in your config, it uses the defaults datetimeformat is as described in the manual. In my config, however, I have this:
[locale]
timeformat = %H:%M
dateformat = %d-%b
longdateformat = %d-%b-%Y
datetimeformat = %d-%b-%Y %H:%M
longdatetimeformat = %d/%m/%Y %H:%M
So to add an event that runs from 10:15 to 11:45 on Nov 6 I'd use:
khal new -a somecalendar 06/11/2018 10:15 06/11/2018 11:45 "Title of Event"
In general, however, an error that echos back the expected format would definitely clarify this, especially as %c
isn't seamless to lookup in the Python strftime docs.
Honestly, a custom command to demo the expected formats (khal show timeformat
) with today's date and time would be kind of sweet. But first a hint in the error message.
@amandabee Thanks I will keep that in mind
If I use the wrong formatting to ask for a list of events on some given future data, eg
khal list 18-june-2018 10d
I get a heap of errors that end with the very clear notice thatkhal
wasn't able to parse the date range I provided:Ideally khal would not show me the full traceback, but would be more precise about what it is looking for in a date. Something like:
If I give a bad DELTA, eg.
khal calendar 18-jun 1w
I get a slightly different error, but it doesn't tell me that the delta is the problem:Something like "10w does not appear to be a valid END or DELTA value" would clue me into the fact that khal doesn't do weeks.