diff --git a/html/docs/design/recurrence.html b/html/docs/design/recurrence.html index 031c9bc7..2a895062 100644 --- a/html/docs/design/recurrence.html +++ b/html/docs/design/recurrence.html @@ -54,7 +54,7 @@
Recurrence needs an overhaul to improve weaknesses and add new features. -
+
-
mask
, imaѕk
Attributes
- The mask
attribute in the template is replaced by
- last
, which indicates the most recent instance index
- synthesized.
-
- Because instances are never synthesized out of order, we only
- need to store the most recent index.
-
- The imask
attribute in the instance is no longer
- needed.
-
parent
to template
- The name parent
implies subtasks, and confuses those
- who inspect the internals. The value remains the UUID of the
- template. This frees up the namespace for future use with subtasks.
-
- To indicate the flavor of recurrence, support the following values: - -
periodic |
- - Instances are created on a regular schedule. - Example: send birthday flowers. It must occur on a regular - schedule, and doesn't matter if you were late last year. - This is the default value. - | -
chained |
- - Instances are created back to back, so when one instance ends, - the next begins, with the same recurrence. - Example: mow the lawn. If you mow two days late, the next - instance is not two days early to compensate. - | -
- The delta between wait
and due
date in
- the template should be reflected in the delta between
- wait
and due
date in the instance.
+
+
mask
, imaѕk
Attributes
+ The mask
attribute in the template is replaced by
+ last
, which indicates the most recent instance index
+ synthesized.
- Similarly, 'scheduled' must be handled the same way.
-
- Upgrade template: -
rtype:periodic
last:N
where N
is the length of mask
mask
imask
attribute in the instance is no longer
+ needed.
+
- Upgrade instance:
- parent
to template
imask
wait
if not set to: wait:due + (template.due - template.wait)
scheduled
if not set to: scheduled:due + (template.due - template.scheduled)
parent
to template
+ The name parent
implies subtasks, and confuses those
+ who inspect the internals. The value remains the UUID of the
+ template. This frees up the namespace for future use with subtasks.
+
- Deleting a rtype:chained
instance causes the next
- chained instance to be synthesized.
+
+
+ To indicate the flavor of recurrence, support the following values: + +
Proposed TaskWarrior 'rtype' | +Org-mode equivalent | +Instances accumulate if not done or deleted | +Next task's due date set to | +Example | +
---|---|---|---|---|
periodic (default) |
+ + |
+ Y | +Latest instance's due date + interval | +Pay your rent every month. (You may be late, but you can't just skip a month.) | +
chained |
+ .+ |
+ N | +Latest instance's done date + interval | +Ring your mother daily. (If you delay or skip, you don't ring her twice the next day to compensate.) | +
snapping |
+ ++ |
+ N | +Latest instance's due date + n x interval, where n is an integer that is incremented until the next task's due date is in the future | +Ring your aunt every Sunday. (If you delay or skip, you don't ring twice next time to compensate, but you should thereafter resume the routine.) | +
(now + template.recur)
.
-
+
+
+ The delta between wait
and due
date in
+ the template should be reflected in the delta between
+ wait
and due
date in the instance.
-
- TBD -
+ Similarly, 'scheduled' must be handled the same way. + -- Expand date specifications to use pattern phrases: -
4th thursday in November
4th thursday of November
Friday before easter
next Tuesday
last Tuesday
last July
weekend
3 days before eom
in the morning
4pm
noon
midnight
+ Upgrade template: +
rtype:periodic
last:N
where N
is the length of mask
mask
parent
to template
imask
wait
if not set to: wait:due + (template.due - template.wait)
scheduled
if not set to: scheduled:due + (template.due - template.scheduled)
+ TBD +
-- TBD -
+ ++ Expand date specifications to use pattern phrases: +
4th thursday in November
4th thursday of November
Friday before easter
next Tuesday
last Tuesday
last July
weekend
3 days before eom
in the morning
4pm
noon
midnight
periodic
template- When adding a new periodic template: +
task add ... due:D recur:R wait:D-1wk scheduled:D-1wk until:U+ +
periodic
template+ When adding a new periodic template: + +
task add ... due:D recur:R wait:D-1wk scheduled:D-1wk until:U- Creates: -
template.uuid: NEW_UUID + Creates: +template.uuid: NEW_UUID template.description: ... template.entry: now template.modified: now @@ -256,9 +268,9 @@- Creating the Nth instance (index N): + Creating the Nth instance (index N): -Implementation: Adding a new
template.rtype: periodic template.last:periodic
templateClone instance from template. +Clone instance from template. instance.uuid: NEW_UUID instance.modified: now @@ -268,16 +280,22 @@- + -Implementation: Adding a new
instance.start: template.last: Nperiodic
templateImplementation: Adding a new
-chained
template- When adding a new chained template: + +
Implementation: Adding a new
+chained
template+ Deleting/completing an instance should cause the next chained + instance to be synthesized, giving illusion that due date is + simply changed to
+(now + template.recur)
. ++ When adding a new chained template: -
task add ... due:D recur:R wait:D-1wk scheduled:D-1wk until:U rtype:chained+task add ... due:D recur:R wait:D-1wk scheduled:D-1wk until:U rtype:chained- Creates: -template.uuid: NEW_UUID + Creates: +template.uuid: NEW_UUID template.description: ... template.entry: now template.modified: now @@ -288,48 +306,49 @@- Creating the Nth instance (index N): -Implementation: Adding a new
template.until: U template.rtype: chainedchained
templateClone instance from template. - -instance.uuid: NEW_UUID -instance.modified: now -instance.due: instance[N-1].end + template.recur -instance.wait: instance.due + (template.due - template.wait) -instance.scheduled: instance.due + (template.due - template.scheduled) -instance.start:+ Creating the Nth instance (index N): +Clone instance from template. - Chained tasks do not obey-rc.recurrence.limit
, and - show only one pending task at a time. - +instance.uui d: NEW_UUID +instance.mod ified: now +instance.due : instance[N-1].end + template.recur +instance.wai t: instance.due + (template.due - template.wait) +instance.sch eduled: instance.due + (template.due - template.scheduled) +instance.sta rt:Implementation: Special handling for months
-- Certain recurrence periods are inexact: -
rc.recurrence.limit
, and
+ show only one pending task at a time.
+
- When the recurrence period is P1M
the number of days
- in a month varies and causes drift.
-
+
+ + Certain recurrence periods are inexact: +
P1M
the number of days
+ in a month varies and causes drift.
+
-
- When the recurrence period is P1Y
the number of days
- in a year varies and causes drift.
-
+ When the recurrence period is P1Y
the number of days
+ in a year varies and causes drift.
+
- When the recurrence period is P1D
the number of hours
- in a day varies due to daylight savings, and causes drift.
-
+ When the recurrence period is P1D
the number of hours
+ in a day varies due to daylight savings, and causes drift.
+
- Drift should be avoided by carefully implementing: +
+ Drift should be avoided by carefully implementing: -
instance.due: template.due + (N * template.recur)- +
instance.due: template.due + (N * template.recur)+