diff options
author | Matthew Sotoudeh <matthewsot@outlook.com> | 2022-02-01 20:18:42 -0800 |
---|---|---|
committer | Matthew Sotoudeh <matthewsot@outlook.com> | 2022-02-01 20:18:42 -0800 |
commit | e2f1ef3274730fb07f7e604131e00484ebdcbdf9 (patch) | |
tree | d33712d8f22b0d799066c2fb3c28c2467f792f75 | |
parent | 3861cba4a2b3abfd014e1a96743b60acccbeaba6 (diff) |
-rw-r--r-- | src/task.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/task.rs b/src/task.rs index 817628d..2361b8c 100644 --- a/src/task.rs +++ b/src/task.rs @@ -31,6 +31,9 @@ pub fn does_overlap(timespan_start: &NaiveTime, timespan_end: &NaiveTime, task: } pub fn tasks_overlap(task_a: &Task, task_b: &Task) -> bool { + if task_a.date != task_b.date { + return false; + } return match [task_a.start_time, task_a.end_time] { [Some(start), Some(end)] => does_overlap(&start, &end, task_b), _ => false, |