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

date validation doesn't check for leap years or short months #114

Closed
Stephen-Gates opened this issue Nov 30, 2017 · 3 comments · Fixed by #158
Closed

date validation doesn't check for leap years or short months #114

Stephen-Gates opened this issue Nov 30, 2017 · 3 comments · Fixed by #158

Comments

@Stephen-Gates
Copy link

I can validate successfully with dates like:

  • 1999-02-29 (invalid not a leap year)
  • 1999-11-31 (30 days has September, April, June and November)
@roll roll self-assigned this Dec 10, 2017
@roll roll added {planning} and removed {current} labels Dec 10, 2017
@roll roll removed their assignment Feb 5, 2018
@roll roll added this to Software in Frictionless General Mar 19, 2019
@roll roll added the contribute label Oct 2, 2019
@chellem
Copy link

chellem commented Oct 24, 2019

Hello,

How can I reproduce the bug?

To get me in a direction to look into.

@Stephen-Gates
Copy link
Author

I found the bug using Data Curator https://github.com/ODIQueensland/data-curator however maintenance of the software has slowed due to lack of funding.

@roll
Copy link
Member

roll commented Oct 25, 2019

@chellem
Please take a look at this example:

const {Field} = require("../src")

const field = new Field({'type': 'date'})
console.log(field.castValue('1999-11-31'))
// Actual: 1999-11-30T22:00:00.000Z
// Expected: TableschemaError is raised

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants