misoproject / dataset

JavaScript library that makes managing the data behind client-side visualisations easy
http://misoproject.com
GNU General Public License v2.0
1.18k stars 99 forks source link

Fixes for Time Type Formats #226

Open jakesower opened 10 years ago

jakesower commented 10 years ago

Time formats were incorrectly matching due to some issues with the rexeps. Example:

{input: "2011", format: "D/M/YYYY"} would match incorrectly because the regex would be: \d{1}|\d{2}\/\d{1}|\d{2}/\d{4}

That finds the first \d{1} and calls it a day, rather than looking over the whole regex. Wrapping each element in parentheses fixes the issue.

I also added an explicit 'json' requirement to the Gemfile since it wasn't working with my newer version of rack. It's in its own commit.