Create_from_a_string.rst 410 B

12345678910111213
  1. Create a DateTimeRange instance from a range text
  2. -----------------------------------------------------------------
  3. :Sample Code:
  4. .. code:: python
  5. from datetimerange import DateTimeRange
  6. time_range = DateTimeRange.from_range_text("2015-03-22T10:00:00+0900 - 2015-03-22T10:10:00+0900")
  7. str(time_range)
  8. :Output:
  9. ::
  10. '2015-03-22T10:00:00+0900 - 2015-03-22T10:10:00+0900'