Skip to content

Conversation

@fgregg
Copy link
Contributor

@fgregg fgregg commented Dec 8, 2017

Currently, if the a field contains text that can be cast to a date or datetime by parsedatetime, agate will cast the entire field to a date or datetime, even if there are other parts of the field.

For example:

> printf "foo\n720(38-4)31A-1.1(A)" | csvlook
|                 foo |
| ------------------- |
| 2040-01-01 07:20:00 |

and

> printf "COMMENT\nMC 5.7.10 Per Dorothy Carroll\ntesting workgroup fix - 4/7/2010 - Marcy Liberty" | csvlook
|    COMMENT |
| ---------- |
| 2010-05-07 |
| 2010-04-07 |

This PR addresses this inappropriate casting and adds tests.

Releated to wireservice/csvkit#910 and wireservice/csvkit#911

@fgregg
Copy link
Contributor Author

fgregg commented Dec 11, 2017

Thanks @jpmckinney, what's the review and approval process here?

@nbedi
Copy link
Member

nbedi commented Dec 11, 2017

Looks good! Thanks for opening this. Merging now, will be in the next release.

@nbedi nbedi merged commit 350d7ca into wireservice:master Dec 11, 2017
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