Skip to content

Commit

Permalink
v1.9.4
Browse files Browse the repository at this point in the history
  • Loading branch information
roll committed Oct 30, 2019
1 parent 8dd53f5 commit df542bb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "tableschema",
"version": "1.9.3",
"version": "1.9.4",
"description": "A library for working with Table Schema in Javascript.",
"license": "MIT",
"main": "lib/index.js",
Expand Down
2 changes: 2 additions & 0 deletions src/types/date.js
Expand Up @@ -24,6 +24,8 @@ function castDate(format, value) {
Please use "<PATTERN>" without "fmt:" prefix.`)
format = format.replace('fmt:', '')
}
// https://github.com/d3/d3-time-format/issues/47
// It doesn't raise any error if the value is out-of-range
value = moment(timeParse(format)(value))
}
if (!value.isValid()) {
Expand Down
2 changes: 2 additions & 0 deletions src/types/datetime.js
Expand Up @@ -24,6 +24,8 @@ function castDatetime(format, value) {
Please use "<PATTERN>" without "fmt:" prefix.`)
format = format.replace('fmt:', '')
}
// https://github.com/d3/d3-time-format/issues/47
// It doesn't raise any error if the value is out-of-range
value = moment(timeParse(format)(value))
}
if (!value.isValid()) {
Expand Down

0 comments on commit df542bb

Please sign in to comment.