diff --git a/src/main/scala/model/Task.scala b/src/main/scala/model/Task.scala index f6da7b2..d77b3a6 100644 --- a/src/main/scala/model/Task.scala +++ b/src/main/scala/model/Task.scala @@ -1,5 +1,8 @@ package model +import java.text.SimpleDateFormat +import java.util.Calendar + import play.api.libs.json.{JsValue, Json} @@ -21,7 +24,11 @@ object Task { def apply(title: String, description: String): Task = { val thisId = nextId nextId += 1 - new Task(cleanString(title), cleanString(description, 1000), thisId.toString) + + val format = new SimpleDateFormat(" '[Created on' EEE, MMM dd 'at' hh:mm aa']'") + val dateCreated = format.format(Calendar.getInstance().getTime()) + + new Task(cleanString(title), cleanString(description, 1000) + dateCreated, thisId.toString) } diff --git a/todo-scheduler.iml b/todo-scheduler.iml new file mode 100644 index 0000000..8333d43 --- /dev/null +++ b/todo-scheduler.iml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file