forked from efecan-circlelabs/htmldate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support min_date/max_date as datetimes or datetime strings (adbar#74)
* Support min_date/max_date as datetimes or datetime strings * support passing datetimes and including time component, e.g. * `find_date(..., min_date=datetime(...))` * `find_date(..., max_date="2020-03-14 12:46:58') * raise warning on invalid argument while preserving previous behavior/result * correctly respect typing annotation * consolidate code * fixup black * fixup black once again, apologies * fix mypy * Project-wide monkey-patch datetime.fromisoformat for Python <=3.6 * Remove duplicate code * fixup monkeypatch. Should have used and IDE 😅 * Fix mypy on Py3.6 * review function: check_date_input() * Add a test case for min_date = datetime object * extend tests * update docs * tests: fix timezone * cleaning: elif → if --------- Co-authored-by: Adrien Barbaresi <[email protected]>
- Loading branch information
Showing
7 changed files
with
84 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters