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

Fixed Regexp to not use ECMAScript 2018 features #3

Merged
merged 1 commit into from
Feb 23, 2019
Merged

Conversation

emoulson
Copy link
Contributor

@emoulson emoulson commented Feb 23, 2019

Previous version used regexp named capture groups, which is currently only supported in Chrome.
https://github.com/tc39/proposal-regexp-named-groups

Commented-out the named groups (I like the ability to name, so I want to reintroduce this if/when the proposal is better supported) and switched to using array references.

// hour: (typeof t.hour == 'undefined') ? 0 : t.hour,
        hour: (typeof t[2] == 'undefined') ? 0 : t[2],

Ideally, this can be fixed by making a better input parser instead of relying on a really long regex (#4).

@emoulson emoulson merged commit 1c44b95 into master Feb 23, 2019
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.

1 participant