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

shortDate parser format bug #143

Open
ghost opened this issue May 18, 2018 · 0 comments
Open

shortDate parser format bug #143

ghost opened this issue May 18, 2018 · 0 comments

Comments

@ghost
Copy link

ghost commented May 18, 2018

s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/, "$1/$2/$3");

There is a bug in that line, when dateFormat is or the form "dd/mm/yy".
The replacement string should be $3/$2/$1, to meet the requirement of the JavaScript Date constructor.
The current replacement string is not a valid date input string for the constructor.

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

No branches or pull requests

0 participants