summaryrefslogtreecommitdiffstats
path: root/src/apoint.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/apoint.c')
-rw-r--r--src/apoint.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/apoint.c b/src/apoint.c
index d5d9dc3..a1c4934 100644
--- a/src/apoint.c
+++ b/src/apoint.c
@@ -119,8 +119,9 @@ struct apoint *apoint_new(char *mesg, char *note, long start, long dur,
unsigned apoint_inday(struct apoint *i, long *start)
{
- return (date_cmp_day(i->start, *start) <= 0 &&
- date_cmp_day(i->start + i->dur - 1, *start) >= 0);
+ return (date_cmp_day(i->start, *start) == 0 ||
+ (date_cmp_day(i->start, *start) < 0 &&
+ date_cmp_day(i->start + i->dur - 1, *start) >= 0));
}
void apoint_sec2str(struct apoint *o, long day, char *start, char *end)