Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've implemented the dateformat argument. My implementation isn't the most all encompassing but it allows for better customizaiton. Personally, I prefer ISO 86O1 standard for date formatting (YYYY-MM-DD). Which is not the default, hence my reason for implementing this disabled feature.
I utilized a dictionary to dynamically construct the string literals used for the regex search and the strptime formatting. This implementation allows the user to specify the following string
YYYY-MM-DD
in any of its 6 permutations:YYYY-MM-DD
YYYY-DD-MM
MM-YYYY-DD
MM-DD-YYYY
DD-YYYY-MM
DD-MM-YYYY
For now the implementation only allows for delimitation on
-
, for simplicity. If there is demand for it, a future PR (or this one if wanted now) could add configurable delimitation between-
,.
, and/
(or whatever your heart desires). Possibly by introducing a new argument to the script.I've also left the default argument as 'DD-MM-YYYY' so as to not break any old code uses of the start date functionality.
For anyone who would like to use this now, I have pushed it to my dockerhub repo: https://hub.docker.com/repository/docker/mattcoleanderson/autodoist/general
It is the 2.0.1-prerelease image. Should this feature be merged in by @Hoffelhas, I will create a non prerelease image built by the official repo.