[time.point.comparisons]

# 30 Time library [[time]](./#time)

## 30.6 Class template time_point [[time.point]](time.point#comparisons)

### 30.6.7 Comparisons [time.point.comparisons]

[ð](#lib:operator==,time_point)

`template<class Clock, class Duration1, class Duration2>
  constexpr bool operator==(const time_point<Clock, Duration1>& lhs,
                            const time_point<Clock, Duration2>& rhs);
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L2488)

*Returns*: lhs.time_since_epoch() == rhs.time_since_epoch()[.](#1.sentence-1)

[ð](#lib:operator%3c,time_point)

`template<class Clock, class Duration1, class Duration2>
  constexpr bool operator<(const time_point<Clock, Duration1>& lhs,
                           const time_point<Clock, Duration2>& rhs);
`

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L2501)

*Returns*: lhs.time_since_epoch() < rhs.time_since_epoch()[.](#2.sentence-1)

[ð](#lib:operator%3e,time_point)

`template<class Clock, class Duration1, class Duration2>
  constexpr bool operator>(const time_point<Clock, Duration1>& lhs,
                           const time_point<Clock, Duration2>& rhs);
`

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L2514)

*Returns*: rhs < lhs[.](#3.sentence-1)

[ð](#lib:operator%3c=,time_point)

`template<class Clock, class Duration1, class Duration2>
  constexpr bool operator<=(const time_point<Clock, Duration1>& lhs,
                            const time_point<Clock, Duration2>& rhs);
`

[4](#4)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L2527)

*Returns*: !(rhs < lhs)[.](#4.sentence-1)

[ð](#lib:operator%3e=,time_point)

`template<class Clock, class Duration1, class Duration2>
  constexpr bool operator>=(const time_point<Clock, Duration1>& lhs,
                            const time_point<Clock, Duration2>& rhs);
`

[5](#5)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L2540)

*Returns*: !(lhs < rhs)[.](#5.sentence-1)

[ð](#lib:operator%3e=,time_point_)

`template<class Clock, class Duration1,
         [three_way_comparable_with](cmp.concept#concept:three_way_comparable_with "17.12.4 Concept three_­way_­comparable [cmp.concept]")<Duration1> Duration2>
  constexpr auto operator<=>(const time_point<Clock, Duration1>& lhs,
                             const time_point<Clock, Duration2>& rhs);
`

[6](#6)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L2554)

*Returns*: lhs.time_since_epoch() <=> rhs.time_since_epoch()[.](#6.sentence-1)
