Skip to content

Commit

Permalink
v1.20.7 Code organization + date order fine tuning
Browse files Browse the repository at this point in the history
  • Loading branch information
akariv committed Mar 13, 2024
1 parent db770c8 commit c482923
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tableschema/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.20.6
1.20.7
16 changes: 15 additions & 1 deletion tableschema/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,20 @@ def __hash__(self):


# Internal
_INFER_DATE_FORMATS = [
'%Y-%m-%d',
'%d/%m/%Y',
'%m/%d/%Y',
'%d/%m/%y',
'%m/%d/%y',
'%Y%m%d',
'%d-%m-%y',
'%Y/%m/%d',
'%d.%m.%Y',
'%d%m%y',
'%d.%m.%y',
]


_INFER_TYPE_ORDER = [
'duration',
Expand All @@ -550,7 +564,7 @@ def __hash__(self):
'array',
'datetime',
'time',
('date', ('%Y-%m-%d', '%Y/%m/%d', '%d/%m/%Y', '%m/%d/%Y', '%Y%m%d', '%Y.%m.%d', '%y-%m-%d', '%y/%m/%d', '%d/%m/%y', '%m/%d/%y', '%y%m%d', '%y.%m.%d')),
('date', _INFER_DATE_FORMATS),
'integer',
'number',
'boolean',
Expand Down

0 comments on commit c482923

Please sign in to comment.