Skip to content
New issue

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

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

Already on GitHub? # to your account

Bug in offset when parsing iso8601 date/time #152

Open
dotdoom opened this issue Mar 23, 2019 · 0 comments
Open

Bug in offset when parsing iso8601 date/time #152

dotdoom opened this issue Mar 23, 2019 · 0 comments

Comments

@dotdoom
Copy link

dotdoom commented Mar 23, 2019

There's an error in regex used to parse iso8601:

+ '(T([0-9]{2})(((:?([0-9]{2}))?((:?([0-9]{2}))?(\.([0-9]+))?))?)'

\. is treated by JavaScript as ., resulting in "any character" match, rather than "dot".
A simple fix would be to replace \. with [.] which is agnostic of escapes. This also needs a test.

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

No branches or pull requests

1 participant