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

Add support for threshold dates in filter query expressions #197

Merged
merged 6 commits into from
Jul 12, 2021

Conversation

zerodat
Copy link
Collaborator

@zerodat zerodat commented Jul 9, 2021

This PR consists of two commits.

  • The first simply removes the generated file src/js/filterlang.mjs from the git repo and adds it to the .gitignore to help keep it from being added to the repo again in future.
  • The second commit adds support for threshold dates (with tag t:) to the filter query expressions. This means also adding a jsTodoTxt extension to recognize the threshold date tag during parsing of the todos.

This PR provides a large part of the functionality requested in issue #193, namely the filtering of the todo list based on threshold dates. Still to do in a future PR is the support for updating threshold dates on completion of recurring todos.

@ransome1
Copy link
Owner

ransome1 commented Jul 9, 2021

@zerodat I'm out for the weekend and cannot build before Monday. Sorry, I didn't expect you to be so fast ;)

@zerodat
Copy link
Collaborator Author

zerodat commented Jul 9, 2021

No problem, @ransome1. Who knows ... maybe I'll have some more for you to merge by Monday. ;)

@zerodat
Copy link
Collaborator Author

zerodat commented Jul 10, 2021

@ransome1, adding commits to this pull request to do the following:

  • make the filter query expressions a little more forgiving in supporting ISO dates with single-digit month or day, and supporting intervals without a number like today+d rather than requiring today+1d.
  • add the code to main.js to support command-line arg for todo file name

@zerodat
Copy link
Collaborator Author

zerodat commented Jul 11, 2021

@ransome1, 😄 these are my last commits for this PR, which should merge painlessly with the head of your develop branch.

The last two commits are:

  • incorporating @weisserd s fix for the ambiguous sunday problem in sugar. I added this to my PR because his fix is in todotxtExtensions.mjs and that is also a file that I have modified to add the ThresholdExtension. Including it in this PR will make it easier for you to merge I think.
  • the bigger commit is to add recurrence support for threshold dates, so that the t: gets updated according to the logic that @amariusz outlined in start date / t: / threshold / defer date / tickler entries support question #193 . Note that I have decided to stick with the past behavior of sleek by adding due dates to todos that have only a rec: tag and neither due: nor t:. But if there is a rec: and a t:, no due: will be added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants