Skip to content

Commit c482923

Browse files
committed
v1.20.7 Code organization + date order fine tuning
1 parent db770c8 commit c482923

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

tableschema/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.20.6
1+
1.20.7

tableschema/schema.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,20 @@ def __hash__(self):
541541

542542

543543
# Internal
544+
_INFER_DATE_FORMATS = [
545+
'%Y-%m-%d',
546+
'%d/%m/%Y',
547+
'%m/%d/%Y',
548+
'%d/%m/%y',
549+
'%m/%d/%y',
550+
'%Y%m%d',
551+
'%d-%m-%y',
552+
'%Y/%m/%d',
553+
'%d.%m.%Y',
554+
'%d%m%y',
555+
'%d.%m.%y',
556+
]
557+
544558

545559
_INFER_TYPE_ORDER = [
546560
'duration',
@@ -550,7 +564,7 @@ def __hash__(self):
550564
'array',
551565
'datetime',
552566
'time',
553-
('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')),
567+
('date', _INFER_DATE_FORMATS),
554568
'integer',
555569
'number',
556570
'boolean',

0 commit comments

Comments
 (0)