Skip to content

Commit

Permalink
Added yearmonth to infer
Browse files Browse the repository at this point in the history
  • Loading branch information
roll committed Oct 27, 2017
1 parent 8b100de commit e44e7c5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
10 changes: 5 additions & 5 deletions data/data_infer_formats.csv
@@ -1,5 +1,5 @@
id,location,website
1,"[90,60]",http://www.test.com
2,"[90,50]",http://www.test.de
3,"[90,40]",http://www.test.uk
4,"[90,30]",http://www.test.co.il
id,location,website,yearmonth
1,"[90,60]",http://www.test.com,2000-10
2,"[90,50]",http://www.test.de,2010-07
3,"[90,40]",http://www.test.uk,2009-05
4,"[90,30]",http://www.test.co.il,2015-04
3 changes: 3 additions & 0 deletions src/schema.js
Expand Up @@ -291,6 +291,9 @@ class Schema {
// Internal

const _INSPECT_VALUE_GUESS_ORDER = [
// This format is too broad
// {type: 'year', format: 'default'},
{type: 'yearmonth', format: 'default'},
{type: 'duration', format: 'default'},
{type: 'geojson', format: 'default'},
// https://github.com/frictionlessdata/tableschema-js/issues/101
Expand Down
1 change: 1 addition & 0 deletions test/infer.js
Expand Up @@ -46,6 +46,7 @@ describe('infer', () => {
{name: 'id', type: 'integer', format: 'default'},
{name: 'location', type: 'geopoint', format: 'array'},
{name: 'website', type: 'string', format: 'uri'},
{name: 'yearmonth', type: 'yearmonth', format: 'default'},
])
})

Expand Down

0 comments on commit e44e7c5

Please sign in to comment.