Canadensys / narwhal-processor

Basic data processing library aiming to normalize similar values ​​in a known format.
MIT License
6 stars 7 forks source link

Date format #12

Closed peterdesmet closed 11 years ago

peterdesmet commented 11 years ago

2 changes to the dateFormat.txt file, one of which requires more implementation.

And a question:

The test files dateFormat.txt and DDMMSSCoordinatesFormat.txt are currently ; separated files. Are these used in automated tests? Because, it would be nice if the file could also be tested directly in the web interface. Something like:

1987;6;3|3 Jun 1987
1987;6;3|03 Jun 1987
2012;12;31|31-12-2012
null;6;null|Jun

The first column will be interpreted as an ID, and can be used for visual checking, the second column is the date that is parsed.

You can remove the branch dateFormat if you no longer need it.

cgendreau commented 11 years ago

Yes, this file (dateFormat.txt) is used in automated tests, so no need to load them in the UI.

Concerning the dubious dates : according to the current definition of the processor we "only produce results from data that are without uncertainty." So returning nothing for those date is what is expected, even if I agree that the year alone could be useful in some cases. This would require additional design to include support for all dates like 2012-12-32 where only a portion is valid.

You should also create branches on your forked repo, not on Canadensys and send the Pull Request from there (forked repo).

So, you could enter a new issue to support partially valid dates if you want.

peterdesmet commented 11 years ago

Ok!

  1. I will remove the partially valid dates from the file, leaving only the second (implemented) example and the removed trailing zeros. That way you could close this pull request if those changes are ok.
  2. I will create an issue for partially valid dates.
  3. I will pull request from my forked repo in the future. I'll try to figure out how to fetch updates from this one to my forked one.
cgendreau commented 11 years ago

nice!, thanks Peter Keeping track of the original repo : http://bassistance.de/2010/06/25/git-fu-updating-your-github-fork/