Compare_time_ranges.rst 447 B

12345678910111213141516
  1. Compare time ranges
  2. -------------------
  3. :Sample Code:
  4. .. code:: python
  5. from datetimerange import DateTimeRange
  6. lhs = DateTimeRange("2015-03-22T10:00:00+0900", "2015-03-22T10:10:00+0900")
  7. rhs = DateTimeRange("2015-03-22T10:00:00+0900", "2015-03-22T10:10:00+0900")
  8. print("lhs == rhs: ", lhs == rhs)
  9. print("lhs != rhs: ", lhs != rhs)
  10. :Output:
  11. ::
  12. lhs == rhs: True
  13. lhs != rhs: False