Closed j-palindrome closed 10 months ago
Hi @joshuatazrein
You really don’t wanna be writing your own code for this. There are so many edge cases and problem cases.
if you wanna work with me to expose the Tasks recurrence code in a way that can be reused by other plugins, please send me an email (see profile here) to set up a session.
I have been looking for a plugin author to work with on this for some time.
Here is an example issue that needs to be dealt with.
https://github.com/obsidian-tasks-group/obsidian-tasks/issues/1087
@claremacrae This is definitely an important issue—thanks for mentioning it! Does Tasks currently expose any code that can be used by other plugins, similar to how Dataview adds a window.dv object? This would be a very useful feature for the Obsidian ecosystem, and I would be interested in helping with this.
What library is used for repeats? Would a simple DateTime.plus({months: x}) with Luxon do the trick? Not sure which library is used by this. Task repeats have always been something difficult—repeating on check vs. from scheduled date etc. I have some free time in August and would be interested in pitching in.
Hi @joshuatazrein, thanks for replying!
Would a simple DateTime.plus({months: x}) with Luxon do the trick
No. In case you haven't seen it, here are the docs for the variety of supported recurrence patterns in Tasks: Recurring Tasks.
And here is the code: https://github.com/obsidian-tasks-group/obsidian-tasks/blob/main/src/Recurrence.ts
You really, really don't want to be replicating it, I promise!
I do have some time in August. July and September are pretty much full. Best to book a time slot sooner rather than later!
Oh, and as per the docs, the library used is rrule: https://github.com/jakubroztocil/rrule
tasks also have an api so that you can use the tasks modal for opening/editing a task. You might look at using that as for tasks plugin users it would be a welcome option.
encourage you to email Clare and see if she can get you an API for recurrence. As she says, lots of weird edge cases. And she support things like "when done" or strict (from original dates) recurrence.
encourage you to email Clare and see if she can get you an API for recurrence. As she says, lots of weird edge cases. And she support things like "when done" or strict (from original dates) recurrence.
Unfortunately the time slots I mentioned earlier have passed.... And I'm pretty much at full capacity now with pairing with other people who are making contributions to the Tasks code.
So I'm very happy to set up a slot, but it will be starting from November now...
shame. perhaps the approach is for the developer to use the code and make it an API that he can submit back as a pull request. he can use it in time-ruler and when the pull request is accepted can remove the code from time-ruler. a win-win for both tasks and time-ruler.
shame. perhaps the approach is for the developer to use the code and make it an API that he can submit back as a pull request. he can use it in time-ruler and when the pull request is accepted can remove the code from time-ruler. a win-win for both tasks and time-ruler.
No, that wouldn't work. It would be too inefficient.
closed this as completed 16 hours ago
Hi @joshuatazrein, May I ask, is this really "completed" or is this "won't do"??
Added to changelog (that's where I keep processed issues)
Currently the plugin doesn't support adding repeats; this will be added soon.