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

Properly convert dates with no timestamp to dates instead of datetimes #4

Merged
merged 1 commit into from
Sep 18, 2015

Conversation

ATeal
Copy link

@ATeal ATeal commented Sep 18, 2015

In the README it lists that the lib should convert to dates then datetimes (https://github.com/bruth/strconv#converters). I've found that it will convert a date string to a datetime object instead with all 0's for the time information. By checking if the time is zero'd out and passing if that's the case we can properly convert dates with no time information to actual date objects instead of datetimes.

@ATeal
Copy link
Author

ATeal commented Sep 18, 2015

Thanks for the feedback @bruth I made the changes to make it a little more clean :) 👍

@bruth
Copy link
Owner

bruth commented Sep 18, 2015

Great. Please squash the commits and add a good commit message and then I will merge. Thanks again.

Check if the converted datetime object contains zero'd time
If not pass onto the date_converter
@ATeal
Copy link
Author

ATeal commented Sep 18, 2015

There ya go! No problem, always glad to help a useful project!

bruth added a commit that referenced this pull request Sep 18, 2015
Properly convert dates with no timestamp to dates instead of datetimes
@bruth bruth merged commit 2856bb1 into bruth:master Sep 18, 2015
@bruth
Copy link
Owner

bruth commented Sep 18, 2015

Released 0.4.1

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.

None yet

2 participants