kvesteri / intervals

Python tools for handling intervals (ranges of comparable objects).
BSD 3-Clause "New" or "Revised" License
107 stars 17 forks source link

fix date and datetime intervals from string #49

Open hitbox opened 4 years ago

hitbox commented 4 years ago

Fix DateInterval and DateTimeInterval initialization from a string.

AlexandreDecan commented 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.

hitbox commented 4 years ago

@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.

kvesteri commented 2 years ago

Please fix the linting errors in tests. Otherwise this looks good