hasSameTimeAs method
Compares time of two DateTime objects.
Implementation
bool hasSameTimeAs(DateTime other) {
return other.hour == hour &&
other.minute == minute &&
other.second == second &&
other.millisecond == millisecond &&
other.microsecond == microsecond;
}