package seedu.emeraldo.model.task;


import seedu.emeraldo.commons.exceptions.IllegalValueException;

/**
 * Represents a Task's date and time in Emeraldo.
 * Guarantees: immutable; is valid as declared in {@link #isValidDateTime(String)}
 */
public class DateTime {
    
    public static final String MESSAGE_ADDRESS_CONSTRAINTS = "Task date and time must follow this format YY/MM/DD HH:MM";
    public static final String ADDRESS_VALIDATION_REGEX = "(.+)?";

    public final String value;

    /**
     * Validates given date and time.
     *
     * @throws IllegalValueException if given address string is invalid.
     */
    public DateTime(String dateTime) throws IllegalValueException {
        assert dateTime != null;
        if (!isValidDateTime(dateTime)) {
            throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);
        }
        this.value = dateTime;
    }

    private static boolean isValidDateTime(String test) {
        return test.matches(ADDRESS_VALIDATION_REGEX);
    }

    @Override
    public String toString() {
        return value;
    }

    @Override
    public boolean equals(Object other) {
        return other == this // short circuit if same object
                || (other instanceof DateTime // instanceof handles nulls
                && this.value.equals(((DateTime) other).value)); // state check
    }

    @Override
    public int hashCode() {
        return value.hashCode();
    }

}
@@ -296,39 +296,40 @@
  String MESSAGE_
-ADDRESS
+DATETIME
 _CONSTRAINTS = %22
@@ -375,22 +375,43 @@
 mat 
-YY
+DD
 /MM/
-DD
+YYYY
  HH:MM
+ in 24 hours format
 %22;%0A 
@@ -440,23 +440,24 @@
  String 
-ADDRESS
+DATETIME
 _VALIDAT
@@ -474,10 +474,182 @@
 = %22(
-.+
+(0?%5B1-9%5D%7C%5B12%5D%5B0-9%5D%7C3%5B01%5D)/(0?%5B1-9%5D%7C%5B1%5D%5B0-2%5D)/((%5B0-9%5D%5B0-9%5D)?%5B0-9%5D%5B0-9%5D))%7B1%7D%22%0A                                                            + %22( (%5B01%5D%5B0-9%5D%7C%5B2%5D%5B0-3%5D):(%5B0-5%5D%5B0-9%5D)
 )?%22;
@@ -1011,23 +1011,24 @@
 MESSAGE_
-ADDRESS
+DATETIME
 _CONSTRA
@@ -1136,24 +1136,94 @@
 ing test) %7B%0A
+        if(test.equals(%22%22))%0A            return true;%0A        else%0A    
         retu
@@ -1242,15 +1242,16 @@
 hes(
-ADDRESS
+DATETIME
 _VAL

Change dateTime validation regex