Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix date and datetime intervals from string #49

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

hitbox
Copy link

@hitbox hitbox commented Feb 21, 2020

Fix DateInterval and DateTimeInterval initialization from a string.

@hitbox hitbox changed the title fix date and datetime fromstring fix date and datetime intervals from string Feb 21, 2020
@AlexandreDecan
Copy link

@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
Copy link
Author

hitbox commented Mar 7, 2020

@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
Copy link
Owner

kvesteri commented May 4, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants