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

Support for abbreviated months with trailing periods #6

Merged
merged 1 commit into from Jun 24, 2015
Merged

Support for abbreviated months with trailing periods #6

merged 1 commit into from Jun 24, 2015

Conversation

walkerdb
Copy link
Contributor

Strings such as "Jan. 1, 2013" fail to parse, due to the presence of the trailing period in the abbreviated month. Since this is a very common way to write out dates, it seems worthwhile to support.

The proposed fix is very simple - just remove all periods from the input text when they're followed by a space.

This does not break any of the current tests, and looking through the current pattern list I don't think it would break any functionality. Due to the requirement of a space after the period, formats such as "d.m.y" are preserved.

Any thoughts?

Strings such as "Jan. 1, 2013" fail to parse, due to the presence of the trailing period in the abbreviated month. Since this is a very common way to write out dates, it seems worthwhile to support.

The proposed fix is very simple - just remove all periods from the input text when they're followed by a space.

This does not break any of the current tests, and looking through the current pattern list I don't think it would break any functionality. Due to the requirement of a space after the period, formats such as "d.m.y" are preserved.

Any thoughts?
@coveralls
Copy link

Coverage Status

Coverage remained the same at 94.8% when pulling 7d877c4 on walkerdb:patch-2 into 41a69b5 on KoffeinFlummi:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 94.8% when pulling 7d877c4 on walkerdb:patch-2 into 41a69b5 on KoffeinFlummi:master.

@KoffeinFlummi
Copy link
Owner

Thanks!

KoffeinFlummi added a commit that referenced this pull request Jun 24, 2015
Support for abbreviated months with trailing periods
@KoffeinFlummi KoffeinFlummi merged commit 9584b6b into KoffeinFlummi:master Jun 24, 2015
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.

None yet

3 participants