code fixes, added isSameOrAfter for DateTime objects, added check for teacher room and status
This commit is contained in:
1 parent
20d7b16ede
commit
a0c025b58b
3 files changed
+48
-12
No files matched your search
@@ -16,4 +16,15 @@ extension IsSameDay on DateTime {
|
||||
TimeOfDay toTimeOfDay() {
|
||||
return TimeOfDay(hour: hour, minute: minute);
|
||||
}
|
||||
|
||||
bool isSameDateTime(DateTime other) {
|
||||
bool isSameDay = this.isSameDay(other);
|
||||
bool isSameTimeOfDay = (toTimeOfDay() == other.toTimeOfDay());
|
||||
|
||||
return isSameDay && isSameTimeOfDay;
|
||||
}
|
||||
|
||||
bool isSameOrAfter(DateTime other) {
|
||||
return isSameDateTime(other) || isAfter(other);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user