aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/main/java/com/encora/Main.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/com/encora/Main.java b/src/main/java/com/encora/Main.java
index 1478229..ad86fc4 100644
--- a/src/main/java/com/encora/Main.java
+++ b/src/main/java/com/encora/Main.java
@@ -81,7 +81,13 @@ public class Main {
if (toDo.text().length() > 120) throw new longerThanMaxException();
selectedToDo.setText(toDo.text());
}
- if (toDo.dueDate() != null) selectedToDo.setDueDate(toDo.dueDate());
+ if (toDo.dueDate() != null) {
+ if (toDo.dueDate().equals(new Date(0))) {
+ selectedToDo.setDueDate(null);
+ } else {
+ selectedToDo.setDueDate(toDo.dueDate());
+ }
+ }
if (toDo.priority() != null) selectedToDo.setPriority(toDo.priority());
}