Skip to content
This repository has been archived by the owner on Feb 2, 2022. It is now read-only.

Date format is inconsistent #56

Closed
rgreinho opened this issue Mar 4, 2019 · 1 comment · Fixed by #57
Closed

Date format is inconsistent #56

rgreinho opened this issue Mar 4, 2019 · 1 comment · Fixed by #57

Comments

@rgreinho
Copy link
Member

rgreinho commented Mar 4, 2019

Issue Type

  • Bug report

Current Behavior

The format of the dates is inconsistent between the fields:

"DOB": "07/09/1987",
"Date": "January 15, 2019",

Expected Behavior

The date fields should respect the English format DD/MM/YYYY across all reports.

@rgreinho
Copy link
Member Author

rgreinho commented Mar 7, 2019

The English format is MM/DD/YYYY 🤦‍♂️

mrengler pushed a commit to mrengler/scrapd that referenced this issue Mar 7, 2019
… any format into the standard English format mm-dd-YYYY and adds a call to this function during data sanitization. This improves legibility of the data as all dates no longer appear in various formats.

Fixes scrapd#56
rgreinho pushed a commit that referenced this issue Mar 8, 2019
* Make sure date string format is consistent
* Fixed changed name and YAPF formatting
* Added tests for date reformat; older tests will still fail (assert 'December 7, 2017' == '07/12/2017' is False)
* Linting / yapf format for test
* This commit adds a function in date_utils to convert a date string of any format into the standard English format mm-dd-YYYY and adds a call to this function during data sanitization. This improves legibility of the data as all dates no longer appear in various formats.
* Fixed changed name and YAPF formatting
* Added tests for date reformat; older tests will still fail (assert 'December 7, 2017' == '07/12/2017' is False)
* Linting / yapf format for test
* Updated CHANGELOG, changed date format to English standard mm/dd/YYYY and updated tests to reflect date format change.
* Fixed formatting issues and unformatted dates in test
* Relocated year logic to parse_date in case of non-DOB date having truncated year
* Should check only DOB for future date parsed; this way bad input for FROM and TO date ranges will have expected behavior.
* Linting fixes and corrected variable name typo
* Pass in parameter to denote DOB and therefore check correct century.

Fixes #56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant