-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add functionality to parse datetimes according C standard format code…
…s. (#165) * Add functionality to parse datetimes according C standard format codes. * use regex to dynamically create specific datetime regex paterns * change from f-string to str.format syntax * remove copy import * allow for colons in time format * allow for more flexible parsing of %z * shield Python 2 from timezone features * add time parsing * uglify code with black * bump version * handle and test single digits for day and month * remove %-j handling * make j flexible number of digits * simplify and reorder, to match docs * just use the map directly * readability improvements * change "tc" to use generic datetime parsing approach * use new conv variable * revert to old logic for tc * blacken again * blacken again sorry * new logic: If it contains day, month, or year, it's a date. Missing years default to the current year. If it contains hours, minutes, seconds, or milliseconds, its a time. If it is a date and a time it's a datetime. * doc update * test roundtrip every directive --------- Co-authored-by: wim glenn <[email protected]>
- Loading branch information
1 parent
04314d8
commit a2e1334
Showing
3 changed files
with
203 additions
and
62 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
Oops, something went wrong.