Added getComperator for comparing dates and method compareDateTo, right
now the compareDateTo doesn't make any difference, but if we change the
compareTo method later this is important.