alphagov/finder-frontend — pull request #122 by alicebartlett (2014-11-14 17:11:29+00:00)
Title: [DO NOT MERGE] Date parsing

Opening this up for comment @james and I did a bit of pairing on this.

Our user research and a look at analytics showed us that we weren't being as flexible with dates as our users expected, so we've written a test suite of all the dates we'd like to accept and have switched to using the Chronic date parsing gem and rewritten the date parser to accept the most commonly input dates.

Thoughts welcome, I'm interested on any feedback on the clarity of the code especially, as there is quite a lot of date fiddling going on to support a few additional formats for which chronic doesn't work.

Ideally after this is merged here I'd like to do the same thing for the code supporting gov.uk/publications as I think this is better than what's currently there.