Open hitbox opened 4 years ago
@hitbox Can I suggest you to have a look at https://github.com/AlexandreDecan/portion ? It's a Python library providing data structure and operations for intervals (atomic and interval sets).
Apologies, it's a bit of publicity for another project, but this repository does not seem to be maintained anymore.
@AlexandreDecan Thanks and I probably would use portion
except I'm not using intervals
directly. I was trying to use a date range type in sqlalchemy-utils
with sqlite3
and the fallback to a string column does not work when coming back out of the database.
I see others posting recent issues about this and thought I'd take a stab at it.
Please fix the linting errors in tests. Otherwise this looks good
Fix DateInterval and DateTimeInterval initialization from a string.