Open TrondurT opened 5 months ago
huh. the entire reason i used csvwlib was to try to get a date validator without having to write one from scratch...
first problem: the TypeConverter wants the info not as rdflib.Term but as strings in a dictionary...
second problem: the TypeConverter completely ignores the format and does not actually validate anything! Once the first problem is fixed, here,
datatype looks like {'base': 'date', 'format': 'dd/MM/yyyy'}
but all that gets used is the 'date'
part and the format is ignored. Furthermore, no error is raised.
I wanted to use a library for this because the csvw specification for dates is weird (e.g. has nothing to do with the standard formats).
At this point, since the csvwlib library is no help, we may as well just not check dates until we have a validator that actually validates.
A better strategy will be to bite the bullet and construct a dateutil.parser.
the date validator validates everything:/ test script in link /manual_test