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

"LIVR: wrong date in "min" parametr" for date '1900-01-01' #14

Open
inzagher opened this issue Feb 19, 2019 · 1 comment
Open

"LIVR: wrong date in "min" parametr" for date '1900-01-01' #14

inzagher opened this issue Feb 19, 2019 · 1 comment

Comments

@inzagher
Copy link

Steps to reproduce:

  1. Create rule { 'iso_date': { min: '1900-01-01' } }
  2. Set time zone with negative offset. For example (UTC-01:00).
  3. Perform validation.

Method isDateValid returns false, then library throws exception.
d.setTime( d.getTime() + d.getTimezoneOffset() * 60 * 1000 );
After this row variable 'd' has value "Sun Dec 31 1899 23:59:28 GMT-0154".

@inzagher inzagher changed the title LIVR: wrong date in "min" parametr for date '1900-01-01' "LIVR: wrong date in "min" parametr" for date '1900-01-01' Feb 19, 2019
@koorchik
Copy link
Owner

Thanks, will check this

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