コード例 #1
0
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;
}
コード例 #2
0
bool operator!= (const DateTime& first, const DateTime& second)
{
    if (first.HasTimezone() == second.HasTimezone())
        return first.NormalizedValue() != second.NormalizedValue();
    return true;
}
コード例 #3
0
DayTimeDuration operator- (const DateTime& first, const DateTime& second)
{
    return DayTimeDuration(first.NormalizedValue() - second.NormalizedValue());
}