bool operator< (const DateTime& first, const DateTime& second) { if (first.HasTimezone() == second.HasTimezone()) return first.NormalizedValue() < second.NormalizedValue(); else if (first.HasTimezone()) return first < DateTime(second.Value(), +14 * 60); else // (second.HasTimezone()) return DateTime(first.Value(), -14 * 60) < second; }
bool operator!= (const DateTime& first, const DateTime& second) { if (first.HasTimezone() == second.HasTimezone()) return first.NormalizedValue() != second.NormalizedValue(); return true; }