khal icon indicating copy to clipboard operation
khal copied to clipboard

All day event process correctly with --notstarted, fix #1004

Open ephase opened this issue 5 years ago • 4 comments

When you do khal list --notstarted, the "today" all-day event is displayed. This MR avoid this problem.

ephase avatar Jan 18 '21 22:01 ephase

Hmm, actually...

d7415 avatar Jan 24 '21 13:01 d7415

Fixing the bug (that khal list now --notstarted still shows all-days) without breaking this looks to be a pain.

d7415 avatar Jan 24 '21 13:01 d7415

Hi @d7415, so if I understand, I need to create a exception to display multi-day events? For example event begins yesterday and ends in 3 day, khal list now --notstarted should display my event for tomorrow and next days but not for today?

ephase avatar Jan 24 '21 23:01 ephase

Hi @d7415, so if I understand, I need to create a exception to display multi-day events? For example event begins yesterday and ends in 3 day, khal list now --notstarted should display my event for tomorrow and next days but not for today?

No. In that example the event has started so shouldn't be shown (and the current code won't show it)

My problems with this PR are:

  • There should be a way to hide events like your example, while showing all-day events today (e.g. hide that I'm on holiday all week, show that it's my friend's birthday today). The current code does this, but the PR does not.
  • This PR results in an inconsistency where running khal list --nostarted at midday will hide an all-day event for today, but show an event that happened this morning.

There is still a bug from #1004 where if a time after midnight is specified (e.g. with now) all day events show in --notstarted. But that looks like we'd have to special-case a time (other than midnight) being specified, which is probably why it wasn't done in the first place. (Well, that and showing today's all-day events in --notstarted isn't likely to cause a major inconvenience)

d7415 avatar Jan 24 '21 23:01 d7415