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

Date parser: Should not ignore separators #683

Closed
rxaviers opened this issue Feb 1, 2017 · 0 comments
Closed

Date parser: Should not ignore separators #683

rxaviers opened this issue Feb 1, 2017 · 0 comments

Comments

@rxaviers
Copy link
Member

rxaviers commented Feb 1, 2017

Parsing a date with correct separator works and is correct:

> Globalize('en').parseDate('1/2/17', {skeleton: 'yMd'})
0017-01-02T02:00:00.000Z

Parsing a date with incorrect separator currently works, but it's correct:

> Globalize('en').parseDate('1-2-17', {skeleton: 'yMd'})
0017-01-02T02:00:00.000Z
> Globalize('en').parseDate('1.2.17', {skeleton: 'yMd'})
0017-01-02T02:00:00.000Z
> Globalize('en').parseDate('1.2.2017', {skeleton: 'yMd'})
2017-01-02T02:00:00.000Z
> Globalize('en').parseDate('10.2.2017', {skeleton: 'yMd'})
2017-10-02T03:00:00.000Z
> Globalize('en').parseDate('10a2a2017', {skeleton: 'yMd'})
2017-10-02T03:00:00.000Z
@rxaviers rxaviers changed the title Date parser: Should not ignores separators Date parser: Should not ignore separators Feb 16, 2017
rxaviers added a commit to rxaviers/globalize that referenced this issue Feb 21, 2017
rxaviers added a commit to rxaviers/globalize that referenced this issue Feb 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant