khal
khal copied to clipboard
get rid of config variables `datetimeformat` and `longdatetimeformat`
We should be able to concatenate date (longdate) with time, or is there any country where one would usually use another notation for dates and times than for datetimes?
This would a) simplify configuration and b) some internals could become cleaner (at least less code).
Example:
configured: timeformat: %H:%M dateformat: %d.%m. longdateformat: %d.%m.%Y
infered: datetimeformat (dateformat + timeformat): %d.%m. %H:%M longdatetimeformat (dateformat + timeformat): %d.%m.%Y %H:%M
Why don't we also use timeformat and dateformat from the user's settings (eg: LC_TIME), instead of having our own extra config? This would let us integrate easierly, and clean up code a bunch more.
At least as a default this would be a good idea.
LC_TIME isn't set on my system, I don't assume it is a popular envvar to set. It's sensible to use it as default if it's there, but I don't like the idea of it replacing khal's config, because that would mean that some things in khal are only settable via envvars while other things are defined in the config.
Regarding the original question: I think it might make sense to some to choose a different delimiter than a space.
LC_TIMEisn't set on my system, I don't assume it is a popular envvar to set.
If undefined, I believe LC_ALL defines your time format. Or some other LC_ I can't recall right now.
I have recently seen people using - as a seperator, e.g., %Y/%m/%d-%H:%M