summaryrefslogtreecommitdiff
path: root/dateutil/parser
Commit message (Collapse)AuthorAgeFilesLines
* Improve documentation for parser errors/warningsPaul Ganssle2020-01-021-2/+11
|
* Document that parser.parse raises ParserErrorPaul Ganssle2020-01-021-4/+4
|
* Update documentation linksPaul Ganssle2020-01-021-3/+3
| | | | | Periodic update of all links that point to redirects or http targets when an https target is available.
* Fix custom repr for ParserErrorPaul Ganssle2020-01-021-2/+3
| | | | | | | | | | This was originally dead code, because an indentation error had `__repr__` defined after the `return` statement in `__str__`. The definition of the `__repr__` is also changed to be more in line with the conception of a repr as "what you would have to evalue to get this object". Even though this is not guaranteed behavior, this commit also adds a regression test to avoid simple errors like this in the future.
* Fix TypeError in parser wrapper logicMark Bailey2020-01-021-1/+1
| | | | | | | | | | | In attempting to pass-through the string representation of an exception we are wrapping, we made the erroneous assumption that `args[0]` would always be a string (or something that can concatenate cleanly with a string). This turns out not to be the case with `IllegalMonthError`, where it is an integer, so to avoid raising an erroneous `TypeError`, we first convert the wrapped exception to a string. See GH issue #981.
* Fix typos in comments and documentationHugo2019-08-271-4/+4
| | | | | Fixes several misspellings, typos and styling errors (e.g. github -> GitHub) in the comments and documentation.
* Use tz.UTC in parserPaul Ganssle2019-04-231-2/+2
|
* Use tz.UTC in isoparserPaul Ganssle2019-04-231-2/+2
|
* Wrap ValueError in ParserErrorPaul Ganssle2019-04-231-1/+4
| | | | | Ensures that ValueErrors raised when building the datetime from an already-parsed string will be raised as ParserError as well.
* Use custom ParserError class in parsergfyoung2019-04-232-5/+19
| | | | | This gives a nicer string representation while retaining access to the input string in the exception arguments.
* Fix error condition when invalid tzinfos is passedBrock Mendel2019-03-201-0/+3
| | | | This switches the error from UnboundLocalError to TypeError.
* Collect parser methods by functionBrock Mendel2019-02-261-33/+43
| | | | This is a minor refactoring to improve the code organization.
* Regroup if statements in tzname logicPaul Ganssle2018-10-061-2/+2
| | | | | This makes the grouping of the logic clearer; UTC is used either in the first group or the second group.
* Accept 'z' for UTC in parserCheuk Ho2018-10-061-2/+4
|
* Accept 'z' for 'Z' in isoparseCheuk Ho2018-10-062-3/+3
|
* Remove unnecessary binary_type compatibility shimJon Dufresne2018-09-241-2/+2
| | | | | The bytes type is available on all supported Pythons. Can remove workaround and make the code more forward compatible with Python 3.
* Accept more than 6 fractional digits in `isoparse`Jay Weisskopf2018-07-031-10/+7
| | | | | | | | | | | | RFC 3339 does not specify a limit to the number of fractional digits that can be provided. In the wild, languages like Go will provide up to 9 digits by default. Since the standard library's `datetime` only supports precision down to microseconds, any extra digits in the fractional component are truncated. Fixes #786
* Fix bug in parse_isotime when hour is 24Paul Ganssle2018-06-201-1/+1
| | | | | | The old behavior parsed the string, modified the 24 component to 0 and then parsed the string a second time, passing an unmodified version to the datetime.time constructor.
* Fix isoparser misinterprets T24:00Ho2018-06-081-1/+7
| | | | | | - Update tests with the correct examples - Update AUTHORS.md - Closes GH issue #658
* Add support for comma separator in isoparsePaul Ganssle2018-05-151-3/+5
|
* Performance improvements in resolve_from_stridxsPaul Ganssle2018-05-071-10/+9
|
* Fix for B.Y.d format corner case #687Brock Mendel2018-05-071-4/+36
| | | | Add changelog file
* Allow user to specify None as tzinfo valueParseThis2018-04-191-6/+4
| | | | | | This commit allows the user to specify None when the dont care about the time zone information in the date time parse.
* Add versionadded tags to isoparse and utilsPaul Ganssle2018-04-171-0/+4
|
* Partially revert convertyear refactoringPaul Ganssle2018-04-151-10/+8
|
* Refactor parserinfo.convertyearCorey2018-04-151-7/+19
| | | | | | Added assertion that year is always positive. Co-authored-by: Lauren Oldja <loldja@users.noreply.github.com>
* Move return to else statement in try/except blockRustem Sayargaliev2018-04-141-2/+2
|
* Catch infinite decimal values in `_is_decimal` (fix #662)Rustem Sayargaliev2018-04-141-1/+6
|
* Catch non-ValueError exceptions in decimalPaul Ganssle2018-03-121-3/+14
|
* Switch unknown timezone warning typePaul Ganssle2018-03-112-2/+7
|
* warn instead of raising... for nowBrock Mendel2018-03-111-11/+13
| | | | edit warning per suggestion
* raise on unidentified tzBrock Mendel2018-03-111-0/+8
|
* Relax strictness of default isoparse behaviorPaul Ganssle2018-03-101-7/+12
|
* Improve isoparse limitations documentationPaul Ganssle2018-03-101-1/+12
|
* Prefer builtin callable() over isinstance(..., collections.Callable)Jon Dufresne2018-01-111-4/+2
| | | | | | Available on all supported Python versions. https://docs.python.org/3/library/functions.html#callable
* Only raise ValueError in parser for nowPaul Ganssle2018-01-072-19/+5
|
* Deprecate dateutil-specific tz formatPaul Ganssle2018-01-031-1/+9
|
* Merge branch 'master' into issue259Paul Ganssle2017-12-191-10/+8
|\
| * remove min() callsBrock Mendel2017-12-111-10/+8
| |
* | Fix 'signal' so it multiplies by the DST changePaul Ganssle2017-12-181-1/+1
| |
* | Revert b15f38aPablo Galindo2017-12-141-1/+1
| |
* | Eliminate unnecessary filteringPablo Galindo2017-12-141-1/+1
| |
* | Implement regexp tokenizer to leave timelex unchanged and minor style changesPablo Galindo2017-12-141-36/+35
| |
* | Adapt tokenizer to optinally disallow behaviour introduced by ↵Pablo Galindo2017-12-101-5/+8
| | | | | | | | bc69c3f3151a3bc9a743d80d29d48701468984ee
* | Fix datetime.parser._parser,_timelex to correctly tokenize default tz format ↵Pablo Galindo2017-12-101-2/+4
| | | | | | | | and add tests
* | Make tz.tzstr fail if an invalid GNU tz string is providedPablo Galindo Salgado2017-12-101-1/+27
|/
* Merge branch 'master' into build_methodsPaul Ganssle2017-12-101-1/+4
|\
| * Removed support for YYYYMM formatKirit Thadaka2017-12-091-1/+4
| |
* | Merge branch 'master' of https://github.com/dateutil/dateutil into build_methodsBrock Mendel2017-12-073-5/+398
|\ \ | |/
| * Fix issue #427, all tests passingMateusz Dziedzic2017-12-071-3/+7
| |