summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/apoint.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/apoint.c b/src/apoint.c
index 409e889..97f23fb 100644
--- a/src/apoint.c
+++ b/src/apoint.c
@@ -119,7 +119,8 @@ 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);
+ return (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)