How to determine whether dateparser.search.search_dates() returns dates, times, or datetimes
- 阅读更多 关于 How to determine whether dateparser.search.search_dates() returns dates, times, or datetimes
问题 Trying to answer another question I stumbled over the following problem: dateparser.search.search_dates() returns a list of tuples, each tuple consisting of a text segment recognized as carrying date and/or time information, and the corresponding datetime (plus an optional language code, if requested). If the segment was of date type, only the date fields of the datetime are set. The others are taken from the current time, or from a base datetime that can be supplied via the settings