Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support times for due dates #109

Closed
untitaker opened this issue Feb 19, 2017 · 6 comments
Closed

Support times for due dates #109

untitaker opened this issue Feb 19, 2017 · 6 comments

Comments

@untitaker
Copy link
Member

untitaker commented Feb 19, 2017

  • Todoman should introduce a time_format configuration parameter that, if non-empty, is additionally used to format due datetimes. It should be omitted if DUE does not have a time component.
  • Todoman should prevent people from using %H, %Mand so on indate_format` (I'm currently doing that)
  • Likewise it should prevent people from using %Y etc in time_format
@WhyNotHugo
Copy link
Member

Okay, so this makes sense. I was actually thinking of additional changes that contribute to this:

  1. Make compact_format configurable (via the configuration file -- no cli flag).
  2. Introduce a new time_format setting (as you suggested).
  3. Change compact_format to include separate due_date and due_time component: {id:3d} [{completed}] {urgent} {due_date} {due_time} {summary} {list}{percent}. I'm not sure if I want to change the default or not. What I am sure of, is that it'll allow you to retain you current output. 😉
  4. The "today"/"tomorrow" thingy will only replace due_date, having no effect on the time (we'll probably add Formatter.parse_time.
  5. Double check how all this affects --porcelain (tests will quickly squeal if we break it though).

@untitaker
Copy link
Member Author

I'm labelling this hard because of the introduction of compact_format. I don't think --porcelain will be affected by this at all. It ignores all format options.

@WhyNotHugo
Copy link
Member

I just realized we need to implement this for #108 to work/make sense (for some reason I'd assumed we'd done this already).

@untitaker
Copy link
Member Author

I don't understand what you mean. What did you think was implemented already?

@WhyNotHugo
Copy link
Member

Well, without date/time separation (the suggestion here), the code for #108 won't work, because format_date actually receives a datetime object.

untitaker added a commit to untitaker/todoman that referenced this issue Feb 22, 2017
@untitaker
Copy link
Member Author

#117 fixes this. I chose a route that doesn't implement a config option for compact_format. The dt_separator is necessary in either case because we need to use it for parsing input as well.

untitaker added a commit to untitaker/todoman that referenced this issue Feb 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants