thombashi / DateTimeRange

DateTimeRange is a Python library to handle a time range. e.g. check whether a time is within the time range, get the intersection of time ranges, truncate a time range, iterate through a time range, and so forth.
https://datetimerange.rtfd.io/
MIT License
106 stars 16 forks source link

Make spaces in separator configurable #41

Closed ghost closed 1 year ago

ghost commented 2 years ago

The current implementation of from_range_text() allows to define the separator, but has hardcoded spaces around them. This is not always the case (see as an example, the STAC api specs datetime uses ).

Suggesting to remove the hardcoded spaces and make them configurable through the separator argument.

thombashi commented 1 year ago

Since DateTimeRange 2.0.0, you can specify a regular expression as separator. Thank you for your contribution.