quandl/quandl_babelfish — pull request #1 by tammer (2014-04-24 20:55:54+00:00)
Title: handle AMBIGUOUS US dates

A user just tried to send this:

1/1/1952,156309
2/1/1952,156527
3/1/1952,156731
4/1/1952,156943
5/1/1952,157140
6/1/1952,157343
7/1/1952,157553
8/1/1952,157798
9/1/1952,158053
10/1/1952,158306
11/1/1952,158451
12/1/1952,158757
1/1/1953,158973
2/1/1953,159170
3/1/1953,159349
4/1/1953,159556
5/1/1953,159745
6/1/1953,159956
7/1/1953,160184
8/1/1953,160449
9/1/1953,160718
10/1/1953,160978

every single date is ambiguous, yet a human will know what this means. to babel-fish should too.

my solution is to loosen the ambiguity condition in data_maid. what i did was make it so that we do a second pass if there is not good_date on the first pass. the second pass is less strict about ambiguity.

The result should be that only if *every* data is ambiguous do we guess that the format must be US format.

I added on spec test for this and it now passes. i took out two spec tests that previously expected this case to fail.