Skip to content

Added improvements for date field inputs #31

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

Closed
wants to merge 2 commits into from

Conversation

CalebM1987
Copy link

dates can now be added as datetime.datetime() objects and strings matching the format of '2015/08/10' and '2015-08-10'. Before dates could only be entered in this format '20150810'.

dates can now be added as datetime.datetime() objects and strings matching the format of '2015/08/10' and '2015-08-10'
used ''.join() to merge year, month, date strings
@micahcochran
Copy link
Contributor

This seems to be a good patch that allow pyshp to be a bit more flexible with handling dates fields during writing a shapefile.

@karimbahgat
Copy link
Collaborator

Reading and writing datetime.date objects implemented in #71. The ability to write strings would be another good enhancement for a future PR, but seems a .replace('/', '').replace('-', '') would suffice instead of bringing in all of regex.

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