-
-
Notifications
You must be signed in to change notification settings - Fork 115
Recurring todos (rec:)
If you want a todo to repeat itself you need to specify a recurrence interval using the rec:
attribute. The sleek user interface provides controls to set the rec:
attribute for you, or you can edit it into the text of the todo yourself. Possible values for the rec:
attribute are:
-
d
(daily) -
b
(each business day) -
w
(weekly) -
m
(monthly) -
y
(anually)
For example, you can use the syntax rec:m
to repeat in one month. You can also specify a different number of months, for example, rec:3m
to repeat every 3rd month. If you specify a number, it must be greater than or equal to one.
When you mark a recurring todo as completed, sleek will create a duplicate of it with a new due date. The new due date is based on the date of completion plus the recurrence interval. Even if the original todo didn't have a due date specified, the duplicate will have the new due date based on the completion date plus the recurrence interval.
Looking at this example Example todo rec:w
, you can see this todo doesn't have a due date, but a recurrence of w
which means one week. Once this todo is set complete, a duplicate will be created. The recurrence interval of one week will be added to the date of completion which will then become the due date of the new todo. For instance, if you mark this todo complete on Tuesday, 2021-06-01, the duplicate will look like this: 2021-06-01 Example todo due:2021-06-08 rec:w
.
Business days in sleek are defined to include Monday to Friday, not Saturday and not Sunday. For instance, if you create and complete the todo Example todo rec:4d
on Tuesday, 2021-06-01, the due date of the newly created duplicate will be the following Saturday 2021-06-05. But if you instead create and complete the todo Example todo rec:4b
, the due date of the newly created duplicate will be set to the following Monday (2021-06-01 Example todo due:2021-06-07 rec:4b
).
In the default recurrence behavior described above, the recurrence interval is added to the date of completion. This is convenient for a task such as Wash the windows due:2021-06-01 rec:2m
. Once you wash the windows, you want to do it again two months later. Even if you don't do the washing until a few weeks late, it makes sense to wait a full two months to do it again. If you finally do it on 2021-06-25, the new due date for the recurring todo will be 2021-08-25.
You can also define a strict recurrence, where the recurrence time frame is added to the previous due date, rather than to the completion date. You get this by including a plus sign +
in the rec:
value right after the colon. This is useful when a task must repeat on specific dates no matter when you actually complete it. For example, if you pay the rent on the 15th of every month, you might have a todo pay the rent due:2021-05-15 rec:+1m
. If you are late in paying the rent, and mark the todo completed on 2021-06-01, the new duplicate todo will be pay the rent due:2021-06-15 rec:+1m
even though that is only two weeks away.
If you specify a strict recurrence with the plus sign, but the todo has no due date, the new duplicate todo will have a due date equal to the completion date plus the recurrence interval. The next time the recurring todo is completed, it will follow the normal rule for strict recurrence based on recurrence interval and previous due date.