-
Notifications
You must be signed in to change notification settings - Fork 432
Select date format for todo tasks #2713
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
base: master
Are you sure you want to change the base?
Conversation
|
Do we really need this? We have a snippet engine with time support and a dedicated time dialog too You can define a template as
Then you simply create a new task and insert the snippet to get your chosen task format You can also make something similar your 'share into' format template. Mine inserts a full iso date time. |
|
Thanks for the explanation, I have tried your suggestion, it works. However, this PR adds time automatically at the moment a new line/task is created, using the configured date format. Currently, it’s not possible to change the built-in date format that is inserted automatically on a new line — snippets require an explicit user action and don’t affect the default behavior. So this change is about:
Snippets and templates are still very powerful, but they don’t replace the need for configuring the app’s automatic date format, which is what this PR focuses on. To make it even more customizable, it would be useful to have an option for set 'custom date format', similar to your template suggestion (instead of predefined ones as in this PR), but this type of change would require rework on how app handles date parsing. |
|
It sounds more like you are after to customize not the normal todo.txt date, but what comes after it. At todo.txt the format is simple, and it always is either yyyy-mm-dd, or nothing when you want to leave it out. |
|
Thanks for clarifying, that makes sense, and I agree that the core todo.txt date format should remain fixed to avoid requiring changes across many related components. To clarify my intent: the original goal was to make the todo.txt date format configurable at its source by allowing custom patterns via SimpleDateFormat, as it initially appeared to be a simple text value added to each new line. However, after working with the code, it became clear that more functionality is tied to this format than initially expected. As a result, I tried to start with the least disruptive approach by introducing a small set of predefined patterns. Given this, I’m happy to close PR. It may still be possible to approach this in a different direction by adding the ability to include a time component in each task’s start or completion date (for example, Thanks for the feedback and for taking the time to explain everything! |
This PR adds a new setting for configuring date format used in 'To-Do' for newly created tasks.
The new setting provides three predefined date formats:
These formats have space between date and time. When a task marked as complete, the same logic is applied to completed date/time. With this change, due date can include time component and sorting continues to work correctly.
These options can be adjusted if needed, depending on the maintainers’ preferences.
It would also be useful to add the ability to define a custom date format as an additional option. This is possible, but would require more changes, including rewrite of how the application handles date parsing (DATEF_YYYY_MM_DD and PT_DATE). Please add to a comment if such a modification would be appropritate as follow-up change.
This PR can be merged as is if the feature is considered useful and no further modifications are required.