Skip to content

Bug in offset when parsing iso8601 date/time #152

Description

@dotdoom

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions