CLASSROOMIO-T-4: Add deadline and show it was late or early

This commit is contained in:
rotimi-best
2021-09-24 13:20:40 +03:00
parent d368fc6f8d
commit 6e24435a9f
10 changed files with 101 additions and 15 deletions
+5
View File
@@ -0,0 +1,5 @@
export default (created_at, due_date) => {
return !!due_date
? !!(new Date(created_at).getTime() <= new Date(due_date).getTime())
: true;
};