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

Wrong date using Date.defineParser #141

Closed
MarcosFernandes opened this issue Jun 10, 2013 · 2 comments
Closed

Wrong date using Date.defineParser #141

MarcosFernandes opened this issue Jun 10, 2013 · 2 comments

Comments

@MarcosFernandes
Copy link

Hi,

Date is not being correcty formatted using dd/mm/YYY. Here's how to reproduce:
Date.defineParser("%d/%m/%Y");
console.log( Date.parse("02/04/2010") )

The output would be wrong:
Thu Feb 04 2010 00:00:00 GMT-0200 (BRST)

Note that if the day is above 12 the date is correctly parsed. Ie:
console.log( Date.parse("28/03/2010") )

This would be correctly parsed as:
Sun Mar 28 2010 00:00:00 GMT-0300 (BRT)

@MarcosFernandes
Copy link
Author

I'm sorry, I should have posted this on More bug track instead. Please ignore it.

@SergioCrisostomo
Copy link
Collaborator

@MarcosFernandes I am looking at your post on More for this so I close it here.

Nice that you brought this up for our attention!

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

2 participants