aboutsummaryrefslogtreecommitdiff
path: root/src/models/EventInfo.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/models/EventInfo.ts')
-rw-r--r--src/models/EventInfo.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/models/EventInfo.ts b/src/models/EventInfo.ts
index 6fce60b..b0ac25b 100644
--- a/src/models/EventInfo.ts
+++ b/src/models/EventInfo.ts
@@ -43,6 +43,11 @@ export default class EventInfo {
return `${hour}:${minute} ${meridiem}`;
}
+ conflictsWith(event: EventInfo) {
+ const daysConflict = event.days.match(new RegExp(`[${this.days}]`));
+ return daysConflict && this.start <= event.end && event.start <= this.end;
+ }
+
get info() {
if(this.days === "") {
return `WEB`;