Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for Time Type Formats #226

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

jakesower
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant