diff options
author | Lars Henriksen <LarsHenriksen@get2net.dk> | 2019-06-23 21:42:24 +0200 |
---|---|---|
committer | Lukas Fleischer <lfleischer@calcurse.org> | 2019-09-06 18:15:36 -0400 |
commit | 5fbc499886e93f681f05b7219c7f844d17eaeb1d (patch) | |
tree | 97bdf311ec21eb87571d346ae81406bd180d4f59 /test/bug-002.sh | |
parent | 8a0354e6da920637bdc19063d87240dfa04e2b31 (diff) | |
download | calcurse-5fbc499886e93f681f05b7219c7f844d17eaeb1d.tar.gz calcurse-5fbc499886e93f681f05b7219c7f844d17eaeb1d.zip |
Fix monthly and yearly recurrence algorithms
The calculation of the year of the most recent occurrence for year dates before
the start date (disregarding the year) is incorrect for frequencies greater than
one. The most recent occurrence (for a date as mentioned) is either too far or
too close in the past. In most cases it does no harm because the most recent
ocurrence is in the past and does not span the date (i.e. there is no occurrence
on the day). But the following appointment shows the presence of the bug:
12/31/2019 @ 12:00 -> 01/01/2020 @ 12:00 {2Y} |new year
The occurence on 1 Jan 2020 is missing, because the most recent occurrence is
too far in the past (31 Dec 2018 instead of 31 Dec 2019). An occurrence appears
on 1 Jan 2021, because the most recent occurence is too close in the past (31
Dec 2020 instead of 31 Dec 2019).
A similar miscalculation affects the monthly rule as proved by
3/31/2019 @ 12:00 -> 4/1/2019 @ 11:00 {2M} |change of month
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'test/bug-002.sh')
0 files changed, 0 insertions, 0 deletions