pimutils / pimutils/khal

different timeformats causes issues with khal --format

Open
#848 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: bug
Dominant language
Python
Stars
3.1k
Forks
233
Avg merge
1h 44m
Merged PRs (30d)
1

Description

Different timeformats causes issues with khal --format.

$ khal new -a private today 16:30 Coffee Break
$ khal --no-color list --day-format "" --format "{start-time}|1S|{title}|2S|{end-time}"

# 24 hours clock timeformat
16:30|1S|Coffee Break|2S|17:30  # OK

# 12 hours clock timeformat
|1S|16:30 Coffee Break|2S|  # Not OK

Add a warning?

It may be worth to add a warning to khal for the case a whole-day entry is made with a description that looks like it starts with a time.

Originally posted by @sciurius in https://github.com/pimutils/khal/issues/847#issuecomment-474907789

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the two khal --format commands shown in the issue, comparing the output under 24-hour and 12-hour clock formats. Trace the CLI formatting path and determine whether the format fields or whole-day entry parsing causes the misplaced values. Done means the behavior is consistent or an appropriate warning is produced, with coverage for the reported commands.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.