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

Chrome browser is causing a day in default date to be behind. #20

Open
igniteon opened this issue Sep 4, 2013 · 0 comments
Open

Chrome browser is causing a day in default date to be behind. #20

igniteon opened this issue Sep 4, 2013 · 0 comments

Comments

@igniteon
Copy link

igniteon commented Sep 4, 2013

Using the below, it alleviates the strange issue of chrome parsing the date differently.

function parseDate(input) {
var parts = input.match(/(\d+)/g);
// new Date(year, month [, date [, hours[, minutes[, seconds[, ms]]]]])
return new Date(parts[0], parts[1]-1, parts[2]); // months are 0-based
}

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

1 participant