You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi and thank you for the nice work!
I'm having an issue with non-zero padding datetime extraction, for example matching a 1/11/2017 string with format %-d/%m/%Y. The RegexGenerator class match correctly the pattern, but the DatetimeExtractor cannot extract the pattern as datetime object.
My problem is in the __parse_match_into_maybe_datetime function, in the strptime conversion. I'm using python 3.10 on linux and strptime doesn't accept the %-d directive, but can handle correctly the %d even when there is no zero padding.
From what I have read may be a platform issue and work without problems on other python implementation (anaconda maybe?). The workaround that I found is to replace all %- to their standard version (e.i. %-d to %d)
The text was updated successfully, but these errors were encountered:
It seems that the - extension is available for Glibc implementation, but are not POSIX-compliant. Furthermore, this cheatsheet claims that the Windows implementation can handle # in its place. However, it would be best to avoid platform-specific directives if possible, and if not possible to handle them individually.
Hi and thank you for the nice work!
I'm having an issue with non-zero padding datetime extraction, for example matching a
1/11/2017
string with format%-d/%m/%Y
. The RegexGenerator class match correctly the pattern, but the DatetimeExtractor cannot extract the pattern as datetime object.My problem is in the __parse_match_into_maybe_datetime function, in the strptime conversion. I'm using python 3.10 on linux and strptime doesn't accept the
%-d
directive, but can handle correctly the%d
even when there is no zero padding.From what I have read may be a platform issue and work without problems on other python implementation (anaconda maybe?). The workaround that I found is to replace all
%-
to their standard version (e.i.%-d
to%d
)The text was updated successfully, but these errors were encountered: