Date format validation is currently not working as expected and definitely not working for ISO8601 validation. The issue seems to be that the lib/tableschema/types/date.rbcast_fmt method uses Date.strptime with flags from the iso8601 method, but Date.strptime does not support flags, but date_object.strftime does.
Overview
Date format validation is currently not working as expected and definitely not working for ISO8601 validation. The issue seems to be that the
lib/tableschema/types/date.rb
cast_fmt
method usesDate.strptime
with flags from theiso8601
method, butDate.strptime
does not support flags, butdate_object.strftime
does.Links to docs: https://ruby-doc.org/stdlib-2.5.3/libdoc/date/rdoc/Date.html#method-c-strptime https://ruby-doc.org/stdlib-2.5.3/libdoc/date/rdoc/Date.html#method-i-strftime
I'll submit a PR for a change shortly.
Please preserve this line to notify @roll (lead of this repository)