Skip to content
This repository has been archived by the owner on Jan 11, 2019. It is now read-only.

support 0N format for numeric field #11

Merged
merged 2 commits into from
Mar 18, 2016

Conversation

takumakanari
Copy link
Contributor

This p-r makes that '0N' style in expression like '00-09' can be parsing as numeric value.

@gorhill
Copy link
Owner

gorhill commented Mar 18, 2016

Thanks for the pull request.

For day-of-the-month and month, 00 is not a valid value. This could be corrected by using a different regex for all cases. Instead of:

[0-9]|[1-5][0-9]|0[0-9]
[1-9]|[12][0-9]|3[01]|0[0-9]
...

use:

0?[0-9]|[1-5][0-9]
0?[1-9]|[12][0-9]|3[01]
...

@takumakanari
Copy link
Contributor Author

@gorhill Thanks for your comment.
I fixed the range of day-of-the-month/month and also fixed a regex for all.
Could you review it?

gorhill added a commit that referenced this pull request Mar 18, 2016
…s-with-0

support 0N format for numeric field
@gorhill gorhill merged commit f098431 into gorhill:master Mar 18, 2016
@gorhill
Copy link
Owner

gorhill commented Mar 18, 2016

Thanks.

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

Successfully merging this pull request may close these issues.

2 participants