summaryrefslogtreecommitdiff
path: root/doc%2525252525252525253fid%2525252525252525253dd0602625bcb0af0ec37b74597630c1...
diff options
context:
space:
mode:
authorLars Henriksen <LarsHenriksen@get2net.dk>2017-12-29 20:59:53 +0100
committerLukas Fleischer <lfleischer@calcurse.org>2019-01-07 16:57:48 +0100
commit3d7bb89c8886f6c318d26820ed4c0e6c25f9c959 (patch)
treed4733bdb3167356972511af71808c5b7e3ceb692 /doc%2525252525252525253fid%2525252525252525253dd0602625bcb0af0ec37b74597630c156b188afef%25252525252525253fid%25252525252525253dd0602625bcb0af0ec37b74597630c156b188afef&id2%25252525252525253ddaa30ef3bb592cea54dbdbce0f241bab43eec5dc%252525252525253fid%252525252525253dd0602625bcb0af0ec37b74597630c156b188afef%2525252525253fid%2525252525253ddaa30ef3bb592cea54dbdbce0f241bab43eec5dc%25252525253fid%25252525253dad183c61a93ca0146407d314d4ae671c894f88a8%252525253fid%252525253dad183c61a93ca0146407d314d4ae671c894f88a8%2525253fid%2525253dad183c61a93ca0146407d314d4ae671c894f88a8%25253fid%25253d7851f46fbb1e84fe4fa62a36d1f79b936f040e66%253fid%253d4ba2cc46d74a3b516046d1da565e4abb4dc1b196%3fid%3d42e296c8403e52e46abb5fea70b65ae40a0425f3?id=3d7bb89c8886f6c318d26820ed4c0e6c25f9c959
parent215e90d348b10ffaa11b2a613388adc9285ea65a (diff)
CLI: take input date format from configuration file, do not accept time
Before this patch the input date parsing accepts three formats: yyyy/mm/dd, mm/dd/yyyy, yyyy-mm-dd. They are tried in sequence. It also accepts an additional time (hh:mm), or a time without a date. There are several issues with this: - it is not documented - the date format dd/mm/yyyy is not accepted - print_date() and filter option settings (in parse_args()) can only handle midnight times (which are the result of a date without time) - it is highly uncertain what happens if a time (without a date) is given; at least the -d option treats a time without colon (1215 for 12:15) as a number It seems that acceptance of time input is a by-product and not needed. For these reasons the input date parsing has been changed: - the format is taken from the configuration file (as is the case for the output date format) - only a date, and no time, is accepted Because the input date format is used during parsing of the command line, the configuration file must be loaded first, i.e. the options -D or -C must be parsed before the remaining ones. Loading the configuration file may result in errors (e.g. caused by changes between versions). For this reason config_load() has been made more tolerant and issues warnings instead of exiting. A followup patch will introduce two options to allow the configuration file settings to be overridden for input and output date formats. Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'doc%2525252525252525253fid%2525252525252525253dd0602625bcb0af0ec37b74597630c156b188afef%25252525252525253fid%25252525252525253dd0602625bcb0af0ec37b74597630c156b188afef&id2%25252525252525253ddaa30ef3bb592cea54dbdbce0f241bab43eec5dc%252525252525253fid%252525252525253dd0602625bcb0af0ec37b74597630c156b188afef%2525252525253fid%2525252525253ddaa30ef3bb592cea54dbdbce0f241bab43eec5dc%25252525253fid%25252525253dad183c61a93ca0146407d314d4ae671c894f88a8%252525253fid%252525253dad183c61a93ca0146407d314d4ae671c894f88a8%2525253fid%2525253dad183c61a93ca0146407d314d4ae671c894f88a8%25253fid%25253d7851f46fbb1e84fe4fa62a36d1f79b936f040e66%253fid%253d4ba2cc46d74a3b516046d1da565e4abb4dc1b196%3fid%3d42e296c8403e52e46abb5fea70b65ae40a0425f3?id=3d7bb89c8886f6c318d26820ed4c0e6c25f9c959')
0 files changed, 0 insertions, 0 deletions