Improve performance of recur_prev_occurrence()

And fix item start day for prev command

Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
Lars Henriksen
2020-11-15 10:25:46 +01:00
committed by Lukas Fleischer
parent 3599766cee
commit 1efe24105e
3 changed files with 19 additions and 13 deletions

View File

@@ -142,6 +142,7 @@
*/
#define DAYINSEC (DAYINMIN * MININSEC)
#define NEXTDAY(date) date_sec_change((date), 0, 1)
#define PREVDAY(date) date_sec_change((date), 0, -1)
#define DAYLEN(date) (NEXTDAY(date) - (date))
#define ENDOFDAY(date) (NEXTDAY(date) - 1)
#define HOURINSEC (HOURINMIN * MININSEC)