After tbox extraction, the 2 dates (strings with an unknown date format) are parsed into a pandas timestamp with the same datetime format and then are transformed into ISO8601 date format ('%Y-%m-%d').
To identify the 'common datetime format' the function _guess_datetime_format_for_array is used to extract the 'datetime' format for each string. In most of the cases, the ''guessed" formats are expected to be the same. However for ambiguous dates (e.g 01.05.2010), the transformation takes into account the ''guessed" format of the other date. The transformation is successful only if the 'common datetime format' returns a valid pandas.timestamp date for both transformations. After the timestamps are transformed into pandas.Timestamp both are finally parsed into ISO8601.
Expected geoextent test results are modified (to ISO8601 format).
Closes #78 Closes #81 Closes #82
After tbox extraction, the 2 dates (strings with an unknown date format) are parsed into a pandas timestamp with the same datetime format and then are transformed into
ISO8601
date format ('%Y-%m-%d'
).To identify the 'common datetime format' the function _guess_datetime_format_for_array is used to extract the 'datetime' format for each string. In most of the cases, the ''guessed" formats are expected to be the same. However for ambiguous dates (e.g 01.05.2010), the transformation takes into account the ''guessed" format of the other date. The transformation is successful only if the 'common datetime format' returns a valid
pandas.timestamp
date for both transformations. After the timestamps are transformed intopandas.Timestamp
both are finally parsed intoISO8601
.Expected geoextent test results are modified (to ISO8601 format).