public static double DayDiff(MyDateTime startDateTime, MyDateTime endDateTime) { int startStamp = startDateTime.getTimeStamp(); int endStamp = endDateTime.getTimeStamp(); return ((double) (endStamp - startStamp)) / 3600 / 24; }
public int compareTo(MyDateTime otherDateTime) { return getTimeStamp() - otherDateTime.getTimeStamp(); }