python-dateutil
Advanced tools
Sorry, the diff of this file is too big to display
+31
| dateutil - Extensions to the standard Python datetime module. | ||
| Copyright (c) 2003-2011 - Gustavo Niemeyer <gustavo@niemeyer.net> | ||
| Copyright (c) 2012-2014 - Tomi Pieviläinen <tomi.pievilainen@iki.fi> | ||
| Copyright (c) 2014 - Yaron de Leeuw <me@jarondl.net> | ||
| All rights reserved. | ||
| Redistribution and use in source and binary forms, with or without | ||
| modification, are permitted provided that the following conditions are met: | ||
| * Redistributions of source code must retain the above copyright notice, | ||
| this list of conditions and the following disclaimer. | ||
| * Redistributions in binary form must reproduce the above copyright notice, | ||
| this list of conditions and the following disclaimer in the documentation | ||
| and/or other materials provided with the distribution. | ||
| * Neither the name of the copyright holder nor the names of its | ||
| contributors may be used to endorse or promote products derived from | ||
| this software without specific prior written permission. | ||
| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR | ||
| CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
| EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
| PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
| PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
| LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
| NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
| SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| include LICENSE NEWS zonefile_metadata.json updatezinfo.py |
+232
| Version 2.4.2 | ||
| ------------- | ||
| - Updated zoneinfo to 2015b. | ||
| - Fixed issue with parsing of tzstr on Python 2.7.x; tzstr will now be decoded | ||
| if not a unicode type. gh #51 (lp:1331576), gh pr #55. | ||
| - Fix a parser issue where AM and PM tokens were showing up in fuzzy date | ||
| stamps, triggering inappropriate errors. gh #56 (lp: 1428895), gh pr #63. | ||
| - Missing function "setcachsize" removed from zoneinfo __all__ list by @ryanss, | ||
| fixing an issue with wildcard imports of dateutil.zoneinfo. (gh pr #66). | ||
| - (PyPi only) Fix an issue with source distributions not including the test | ||
| suite. | ||
| Version 2.4.1 | ||
| ------------- | ||
| - Added explicit check for valid hours if AM/PM is specified in parser. | ||
| (gh pr #22, issue #21) | ||
| - Fix bug in rrule introduced in 2.4.0 where byweekday parameter was not | ||
| handled properly. (gh pr #35, issue #34) | ||
| - Fix error where parser allowed some invalid dates, overwriting existing hours | ||
| with the last 2-digit number in the string. (gh pr #32, issue #31) | ||
| - Fix and add test for Python 2.x compatibility with boolean checking of | ||
| relativedelta objects. Implemented by @nimasmi (gh pr #43) and C�dric Krier | ||
| (lp: 1035038) | ||
| - Replaced parse() calls with explicit datetime objects in unit tests unrelated | ||
| to parser. (gh pr #36) | ||
| - Changed private _byxxx from sets to sorted tuples and fixed one currently | ||
| unreachable bug in _construct_byset. (gh pr #54) | ||
| - Additional documentation for parser (gh pr #29, #33, #41) and rrule. | ||
| - Formatting fixes to documentation of rrule and README.rst. | ||
| - Updated zoneinfo to 2015a. | ||
| Version 2.4.0 | ||
| ------------- | ||
| - Fix an issue with relativedelta and freezegun (lp:1374022) | ||
| - Fix tzinfo in windows for timezones without dst (lp:1010050, gh #2) | ||
| - Ignore missing timezones in windows like in POSIX | ||
| - Fix minimal version requirement for six (gh #6) | ||
| - Many rrule changes and fixes by @pganssle (gh pull requests #13 #14 #17), | ||
| including defusing some infinite loops (gh #4) | ||
| Version 2.3 | ||
| ----------- | ||
| - Cleanup directory structure, moved test.py to dateutil/tests/test.py | ||
| - Changed many aspects of dealing with the zone info file. Instead of a cache, | ||
| all the zones are loaded to memory, but symbolic links are loaded only once, | ||
| so not much memory is used. | ||
| - The package is now zip-safe, and universal-wheelable, thanks to changes in | ||
| the handling of the zoneinfo file. | ||
| - Fixed tzwin silently not imported on windows python2 | ||
| - New maintainer, together with new hosting: GitHub, Travis, Read-The-Docs | ||
| Version 2.2 | ||
| ----------- | ||
| - Updated zoneinfo to 2013h | ||
| - fuzzy_with_tokens parse addon from Christopher Corley | ||
| - Bug with LANG=C fixed by Mike Gilbert | ||
| Version 2.1 | ||
| ----------- | ||
| - New maintainer | ||
| - Dateutil now works on Python 2.6, 2.7 and 3.2 from same codebase (with six) | ||
| - #704047: Ismael Carnales' patch for a new time format | ||
| - Small bug fixes, thanks for reporters! | ||
| Version 2.0 | ||
| ----------- | ||
| - Ported to Python 3, by Brian Jones. If you need dateutil for Python 2.X, | ||
| please continue using the 1.X series. | ||
| - There's no such thing as a "PSF License". This source code is now | ||
| made available under the Simplified BSD license. See LICENSE for | ||
| details. | ||
| Version 1.5 | ||
| ----------- | ||
| - As reported by Mathieu Bridon, rrules were matching the bysecond rules | ||
| incorrectly against byminute in some circumstances when the SECONDLY | ||
| frequency was in use, due to a copy & paste bug. The problem has been | ||
| unittested and corrected. | ||
| - Adam Ryan reported a problem in the relativedelta implementation which | ||
| affected the yearday parameter in the month of January specifically. | ||
| This has been unittested and fixed. | ||
| - Updated timezone information. | ||
| Version 1.4.1 | ||
| ------------- | ||
| - Updated timezone information. | ||
| Version 1.4 | ||
| ----------- | ||
| - Fixed another parser precision problem on conversion of decimal seconds | ||
| to microseconds, as reported by Erik Brown. Now these issues are gone | ||
| for real since it's not using floating point arithmetic anymore. | ||
| - Fixed case where tzrange.utcoffset and tzrange.dst() might fail due | ||
| to a date being used where a datetime was expected (reported and fixed | ||
| by Lennart Regebro). | ||
| - Prevent tzstr from introducing daylight timings in strings that didn't | ||
| specify them (reported by Lennart Regebro). | ||
| - Calls like gettz("GMT+3") and gettz("UTC-2") will now return the | ||
| expected values, instead of the TZ variable behavior. | ||
| - Fixed DST signal handling in zoneinfo files. Reported by | ||
| Nicholas F. Fabry and John-Mark Gurney. | ||
| Version 1.3 | ||
| ----------- | ||
| - Fixed precision problem on conversion of decimal seconds to | ||
| microseconds, as reported by Skip Montanaro. | ||
| - Fixed bug in constructor of parser, and converted parser classes to | ||
| new-style classes. Original report and patch by Michael Elsd�rfer. | ||
| - Initialize tzid and comps in tz.py, to prevent the code from ever | ||
| raising a NameError (even with broken files). Johan Dahlin suggested | ||
| the fix after a pyflakes run. | ||
| - Version is now published in dateutil.__version__, as requested | ||
| by Darren Dale. | ||
| - All code is compatible with new-style division. | ||
| Version 1.2 | ||
| ----------- | ||
| - Now tzfile will round timezones to full-minutes if necessary, | ||
| since Python's datetime doesn't support sub-minute offsets. | ||
| Thanks to Ilpo Nyyss�nen for reporting the issue. | ||
| - Removed bare string exceptions, as reported and fixed by | ||
| Wilfredo S�nchez Vega. | ||
| - Fix bug in leap count parsing (reported and fixed by Eugene Oden). | ||
| Version 1.1 | ||
| ----------- | ||
| - Fixed rrule byyearday handling. Abramo Bagnara pointed out that | ||
| RFC2445 allows negative numbers. | ||
| - Fixed --prefix handling in setup.py (by Sidnei da Silva). | ||
| - Now tz.gettz() returns a tzlocal instance when not given any | ||
| arguments and no other timezone information is found. | ||
| - Updating timezone information to version 2005q. | ||
| Version 1.0 | ||
| ----------- | ||
| - Fixed parsing of XXhXXm formatted time after day/month/year | ||
| has been parsed. | ||
| - Added patch by Jeffrey Harris optimizing rrule.__contains__. | ||
| Version 0.9 | ||
| ----------- | ||
| - Fixed pickling of timezone types, as reported by | ||
| Andreas K�hler. | ||
| - Implemented internal timezone information with binary | ||
| timezone files [1]. datautil.tz.gettz() function will now | ||
| try to use the system timezone files, and fallback to | ||
| the internal versions. It's also possible to ask for | ||
| the internal versions directly by using | ||
| dateutil.zoneinfo.gettz(). | ||
| - New tzwin timezone type, allowing access to Windows | ||
| internal timezones (contributed by Jeffrey Harris). | ||
| - Fixed parsing of unicode date strings. | ||
| - Accept parserinfo instances as the parser constructor | ||
| parameter, besides parserinfo (sub)classes. | ||
| - Changed weekday to spell the not-set n value as None | ||
| instead of 0. | ||
| - Fixed other reported bugs. | ||
| [1] http://www.twinsun.com/tz/tz-link.htm | ||
| Version 0.5 | ||
| ----------- | ||
| - Removed FREQ_ prefix from rrule frequency constants | ||
| WARNING: this breaks compatibility with previous versions. | ||
| - Fixed rrule.between() for cases where "after" is achieved | ||
| before even starting, as reported by Andreas K�hler. | ||
| - Fixed two digit zero-year parsing (such as 31-Dec-00), as | ||
| reported by Jim Abramson, and included test case for this. | ||
| - Sort exdate and rdate before iterating over them, so that | ||
| it's not necessary to sort them before adding to the rruleset, | ||
| as reported by Nicholas Piper. | ||
+26
| Metadata-Version: 1.1 | ||
| Name: python-dateutil | ||
| Version: 2.4.2 | ||
| Summary: Extensions to the standard Python datetime module | ||
| Home-page: https://dateutil.readthedocs.org | ||
| Author: Yaron de Leeuw | ||
| Author-email: me@jarondl.net | ||
| License: Simplified BSD | ||
| Description: | ||
| The dateutil module provides powerful extensions to the | ||
| datetime module available in the Python standard library. | ||
| Platform: UNKNOWN | ||
| Classifier: Development Status :: 5 - Production/Stable | ||
| Classifier: Intended Audience :: Developers | ||
| Classifier: License :: OSI Approved :: BSD License | ||
| Classifier: Programming Language :: Python | ||
| Classifier: Programming Language :: Python :: 2 | ||
| Classifier: Programming Language :: Python :: 2.6 | ||
| Classifier: Programming Language :: Python :: 2.7 | ||
| Classifier: Programming Language :: Python :: 3 | ||
| Classifier: Programming Language :: Python :: 3.2 | ||
| Classifier: Programming Language :: Python :: 3.3 | ||
| Classifier: Programming Language :: Python :: 3.4 | ||
| Classifier: Topic :: Software Development :: Libraries | ||
| Requires: six |
| Metadata-Version: 1.1 | ||
| Name: python-dateutil | ||
| Version: 2.4.2 | ||
| Summary: Extensions to the standard Python datetime module | ||
| Home-page: https://dateutil.readthedocs.org | ||
| Author: Yaron de Leeuw | ||
| Author-email: me@jarondl.net | ||
| License: Simplified BSD | ||
| Description: | ||
| The dateutil module provides powerful extensions to the | ||
| datetime module available in the Python standard library. | ||
| Platform: UNKNOWN | ||
| Classifier: Development Status :: 5 - Production/Stable | ||
| Classifier: Intended Audience :: Developers | ||
| Classifier: License :: OSI Approved :: BSD License | ||
| Classifier: Programming Language :: Python | ||
| Classifier: Programming Language :: Python :: 2 | ||
| Classifier: Programming Language :: Python :: 2.6 | ||
| Classifier: Programming Language :: Python :: 2.7 | ||
| Classifier: Programming Language :: Python :: 3 | ||
| Classifier: Programming Language :: Python :: 3.2 | ||
| Classifier: Programming Language :: Python :: 3.3 | ||
| Classifier: Programming Language :: Python :: 3.4 | ||
| Classifier: Topic :: Software Development :: Libraries | ||
| Requires: six |
| six >=1.5 |
| LICENSE | ||
| MANIFEST.in | ||
| NEWS | ||
| README.rst | ||
| setup.cfg | ||
| setup.py | ||
| updatezinfo.py | ||
| zonefile_metadata.json | ||
| dateutil/__init__.py | ||
| dateutil/easter.py | ||
| dateutil/parser.py | ||
| dateutil/relativedelta.py | ||
| dateutil/rrule.py | ||
| dateutil/tz.py | ||
| dateutil/tzwin.py | ||
| dateutil/test/__init__.py | ||
| dateutil/test/test.py | ||
| dateutil/zoneinfo/__init__.py | ||
| dateutil/zoneinfo/dateutil-zoneinfo.tar.gz | ||
| python_dateutil.egg-info/PKG-INFO | ||
| python_dateutil.egg-info/SOURCES.txt | ||
| python_dateutil.egg-info/dependency_links.txt | ||
| python_dateutil.egg-info/requires.txt | ||
| python_dateutil.egg-info/top_level.txt | ||
| python_dateutil.egg-info/zip-safe |
| dateutil |
Sorry, the diff of this file is not supported yet
+124
| dateutil - powerful extensions to datetime | ||
| ========================================== | ||
| .. image:: https://img.shields.io/travis/dateutil/dateutil/master.svg?style=flat-square | ||
| :target: https://travis-ci.org/dateutil/dateutil | ||
| :alt: travis build status | ||
| .. image:: https://img.shields.io/appveyor/ci/dateutil/dateutil/master.svg?style=flat-square | ||
| :target: https://ci.appveyor.com/project/dateutil/dateutil | ||
| :alt: appveyor build status | ||
| .. image:: https://img.shields.io/pypi/dd/python-dateutil.svg?style=flat-square | ||
| :target: https://pypi.python.org/pypi/python-dateutil/ | ||
| :alt: pypi downloads per day | ||
| .. image:: https://img.shields.io/pypi/v/python-dateutil.svg?style=flat-square | ||
| :target: https://pypi.python.org/pypi/python-dateutil/ | ||
| :alt: pypi version | ||
| The `dateutil` module provides powerful extensions to | ||
| the standard `datetime` module, available in Python. | ||
| Download | ||
| ======== | ||
| dateutil is available on PyPI | ||
| https://pypi.python.org/pypi/python-dateutil/ | ||
| The documentation is hosted at: | ||
| https://dateutil.readthedocs.org/ | ||
| Code | ||
| ==== | ||
| https://github.com/dateutil/dateutil/ | ||
| Features | ||
| ======== | ||
| * Computing of relative deltas (next month, next year, | ||
| next monday, last week of month, etc); | ||
| * Computing of relative deltas between two given | ||
| date and/or datetime objects; | ||
| * Computing of dates based on very flexible recurrence rules, | ||
| using a superset of the `iCalendar <https://www.ietf.org/rfc/rfc2445.txt>`_ | ||
| specification. Parsing of RFC strings is supported as well. | ||
| * Generic parsing of dates in almost any string format; | ||
| * Timezone (tzinfo) implementations for tzfile(5) format | ||
| files (/etc/localtime, /usr/share/zoneinfo, etc), TZ | ||
| environment string (in all known formats), iCalendar | ||
| format files, given ranges (with help from relative deltas), | ||
| local machine timezone, fixed offset timezone, UTC timezone, | ||
| and Windows registry-based time zones. | ||
| * Internal up-to-date world timezone information based on | ||
| Olson's database. | ||
| * Computing of Easter Sunday dates for any given year, | ||
| using Western, Orthodox or Julian algorithms; | ||
| * More than 400 test cases. | ||
| Quick example | ||
| ============= | ||
| Here's a snapshot, just to give an idea about the power of the | ||
| package. For more examples, look at the documentation. | ||
| Suppose you want to know how much time is left, in | ||
| years/months/days/etc, before the next easter happening on a | ||
| year with a Friday 13th in August, and you want to get today's | ||
| date out of the "date" unix system command. Here is the code: | ||
| .. doctest:: readmeexample | ||
| >>> from dateutil.relativedelta import * | ||
| >>> from dateutil.easter import * | ||
| >>> from dateutil.rrule import * | ||
| >>> from dateutil.parser import * | ||
| >>> from datetime import * | ||
| >>> now = parse("Sat Oct 11 17:13:46 UTC 2003") | ||
| >>> today = now.date() | ||
| >>> year = rrule(YEARLY,dtstart=now,bymonth=8,bymonthday=13,byweekday=FR)[0].year | ||
| >>> rdelta = relativedelta(easter(year), today) | ||
| >>> print("Today is: %s" % today) | ||
| Today is: 2003-10-11 | ||
| >>> print("Year with next Aug 13th on a Friday is: %s" % year) | ||
| Year with next Aug 13th on a Friday is: 2004 | ||
| >>> print("How far is the Easter of that year: %s" % rdelta) | ||
| How far is the Easter of that year: relativedelta(months=+6) | ||
| >>> print("And the Easter of that year is: %s" % (today+rdelta)) | ||
| And the Easter of that year is: 2004-04-11 | ||
| Being exactly 6 months ahead was **really** a coincidence :) | ||
| Author | ||
| ====== | ||
| The dateutil module was written by Gustavo Niemeyer <gustavo@niemeyer.net> | ||
| in 2003 | ||
| It is maintained by: | ||
| * Gustavo Niemeyer <gustavo@niemeyer.net> 2003-2011 | ||
| * Tomi Pieviläinen <tomi.pievilainen@iki.fi> 2012-2014 | ||
| * Yaron de Leeuw <me@jarondl.net> 2014- | ||
| Building and releasing | ||
| ====================== | ||
| When you get the source, it does not contain the internal zoneinfo | ||
| database. To get (and update) the database, run the updatezinfo.py script. Make sure | ||
| that the zic command is in your path, and that you have network connectivity | ||
| to get the latest timezone information from IANA. If you have downloaded | ||
| the timezone data earlier, you can give the tarball as a parameter to | ||
| updatezinfo.py. | ||
| Testing | ||
| ======= | ||
| dateutil has a comprehensive test suite, which can be run simply by running | ||
| `python setup.py test [-q]` in the project root. Note that if you don't have the internal | ||
| zoneinfo database, some tests will fail. Apart from that, all tests should pass. | ||
| To easily test dateutil against all supported Python versions, you can use | ||
| `tox <https://tox.readthedocs.org/en/latest/>`_. | ||
| All github pull requests are automatically tested using travis. |
| [bdist_wheel] | ||
| universal = 1 | ||
| [egg_info] | ||
| tag_build = | ||
| tag_date = 0 | ||
| tag_svn_revision = 0 | ||
+51
| #!/usr/bin/python | ||
| from os.path import isfile | ||
| import codecs | ||
| import os | ||
| import re | ||
| from setuptools import setup | ||
| if isfile("MANIFEST"): | ||
| os.unlink("MANIFEST") | ||
| TOPDIR = os.path.dirname(__file__) or "." | ||
| VERSION = re.search('__version__ = "([^"]+)"', | ||
| codecs.open(TOPDIR + "/dateutil/__init__.py", | ||
| encoding='utf-8').read()).group(1) | ||
| setup(name="python-dateutil", | ||
| version=VERSION, | ||
| description="Extensions to the standard Python datetime module", | ||
| author="Yaron de Leeuw", | ||
| author_email="me@jarondl.net", | ||
| url="https://dateutil.readthedocs.org", | ||
| license="Simplified BSD", | ||
| long_description=""" | ||
| The dateutil module provides powerful extensions to the | ||
| datetime module available in the Python standard library. | ||
| """, | ||
| packages=["dateutil", "dateutil.zoneinfo"], | ||
| package_data={"dateutil.zoneinfo": ["dateutil-zoneinfo.tar.gz"]}, | ||
| zip_safe=True, | ||
| requires=["six"], | ||
| install_requires=["six >=1.5"], # XXX fix when packaging is sane again | ||
| classifiers=[ | ||
| 'Development Status :: 5 - Production/Stable', | ||
| 'Intended Audience :: Developers', | ||
| 'License :: OSI Approved :: BSD License', | ||
| 'Programming Language :: Python', | ||
| 'Programming Language :: Python :: 2', | ||
| 'Programming Language :: Python :: 2.6', | ||
| 'Programming Language :: Python :: 2.7', | ||
| 'Programming Language :: Python :: 3', | ||
| 'Programming Language :: Python :: 3.2', | ||
| 'Programming Language :: Python :: 3.3', | ||
| 'Programming Language :: Python :: 3.4', | ||
| 'Topic :: Software Development :: Libraries', | ||
| ], | ||
| test_suite="dateutil.test.test" | ||
| ) |
| #!/usr/bin/env python | ||
| import os | ||
| import hashlib | ||
| import json | ||
| import io | ||
| from six.moves.urllib import request | ||
| from dateutil.zoneinfo import rebuild | ||
| METADATA_FILE = "zonefile_metadata.json" | ||
| def main(): | ||
| with io.open(METADATA_FILE, 'r') as f: | ||
| metadata = json.load(f) | ||
| if not os.path.isfile(metadata['tzdata_file']): | ||
| print("Downloading tz file from iana") | ||
| request.urlretrieve(os.path.join(metadata['releases_url'], | ||
| metadata['tzdata_file']), | ||
| metadata['tzdata_file']) | ||
| with open(metadata['tzdata_file'], 'rb') as tzfile: | ||
| sha_hasher = hashlib.sha512() | ||
| sha_hasher.update(tzfile.read()) | ||
| sha_512_file = sha_hasher.hexdigest() | ||
| assert metadata['tzdata_file_sha512'] == sha_512_file, "SHA failed for" | ||
| print("Updating timezone information...") | ||
| rebuild(metadata['tzdata_file'], zonegroups=metadata['zonegroups']) | ||
| print("Done.") | ||
| if __name__ == "__main__": | ||
| main() |
| { | ||
| "metadata_version" : 0.1, | ||
| "releases_url" : "ftp://ftp.iana.org/tz/releases/", | ||
| "tzdata_file" : "tzdata2015b.tar.gz", | ||
| "tzdata_file_sha512" : "767782b87e62a8f7a4dbcae595d16a54197c9e04ca974d7016d11f90ebaf2537b804d111f204af9052c68d4670afe0af0af9e5b150867a357fc199bb541368d0", | ||
| "zonegroups" : [ | ||
| "africa", | ||
| "antarctica", | ||
| "asia", | ||
| "australasia", | ||
| "europe", | ||
| "northamerica", | ||
| "southamerica", | ||
| "pacificnew", | ||
| "etcetera", | ||
| "systemv", | ||
| "factory", | ||
| "backzone", | ||
| "backward"] | ||
| } | ||
| # -*- coding: utf-8 -*- | ||
| __version__ = "2.4.1" | ||
| __version__ = "2.4.2" |
+43
-12
@@ -373,5 +373,10 @@ # -*- coding:iso-8859-1 -*- | ||
| :raises ValueError: Raised for invalid or unknown string format. | ||
| :raises ValueError: Raised if provided `tzinfos` are not in a valid | ||
| format. | ||
| :raises ValueError: | ||
| Raised for invalid or unknown string format, if the provided | ||
| `tzinfo` is not in a valid format, or if an invalid date would | ||
| be created. | ||
| :raises OverFlowError: | ||
| Raised if the parsed date exceeds the largest valid C integer on | ||
| your system. | ||
| """ | ||
@@ -439,3 +444,3 @@ | ||
| "hour", "minute", "second", "microsecond", | ||
| "tzname", "tzoffset"] | ||
| "tzname", "tzoffset", "ampm"] | ||
@@ -755,14 +760,35 @@ def _parse(self, timestr, dayfirst=None, yearfirst=None, fuzzy=False, | ||
| if value is not None: | ||
| # For fuzzy parsing, 'a' or 'am' (both valid English words) | ||
| # may erroneously trigger the AM/PM flag. Deal with that | ||
| # here. | ||
| val_is_ampm = True | ||
| # If there's already an AM/PM flag, this one isn't one. | ||
| if fuzzy and res.ampm is not None: | ||
| val_is_ampm = False | ||
| # If AM/PM is found and hour is not, raise a ValueError | ||
| if res.hour is None: | ||
| raise ValueError('No hour specified with AM or PM flag.') | ||
| if fuzzy: | ||
| val_is_ampm = False | ||
| else: | ||
| raise ValueError('No hour specified with ' + | ||
| 'AM or PM flag.') | ||
| elif not 0 <= res.hour <= 12: | ||
| # If AM/PM is found, it's a 12 hour clock, so raise | ||
| # an error for invalid range | ||
| if fuzzy: | ||
| val_is_ampm = False | ||
| else: | ||
| raise ValueError('Invalid hour specified for ' + | ||
| '12-hour clock.') | ||
| # If AM/PM is found, it's a 12 hour clock, so raise an error for invalid range | ||
| if not 0 <= res.hour <= 12: | ||
| raise ValueError('Invalid hour specified for 12-hour clock.') | ||
| if val_is_ampm: | ||
| if value == 1 and res.hour < 12: | ||
| res.hour += 12 | ||
| elif value == 0 and res.hour == 12: | ||
| res.hour = 0 | ||
| if value == 1 and res.hour < 12: | ||
| res.hour += 12 | ||
| elif value == 0 and res.hour == 12: | ||
| res.hour = 0 | ||
| res.ampm = value | ||
| i += 1 | ||
@@ -1008,2 +1034,7 @@ continue | ||
| def parse(self, tzstr): | ||
| # Python 2.x compatibility: tzstr should be converted to unicode before | ||
| # being passed to _timelex. | ||
| if isinstance(tzstr, binary_type): | ||
| tzstr = tzstr.decode() | ||
| res = self._result() | ||
@@ -1010,0 +1041,0 @@ l = _timelex.split(tzstr) |
@@ -15,3 +15,3 @@ # -*- coding: utf-8 -*- | ||
| __all__ = ["setcachesize", "gettz", "rebuild"] | ||
| __all__ = ["gettz", "rebuild"] | ||
@@ -18,0 +18,0 @@ _ZONEFILENAME = "dateutil-zoneinfo.tar.gz" |
| The dateutil module provides powerful extensions to the | ||
| datetime module available in the Python standard library. | ||
| Metadata-Version: 2.0 | ||
| Name: python-dateutil | ||
| Version: 2.4.1 | ||
| Summary: Extensions to the standard Python datetime module | ||
| Home-page: https://dateutil.readthedocs.org | ||
| Author: Yaron de Leeuw | ||
| Author-email: me@jarondl.net | ||
| License: Simplified BSD | ||
| Platform: UNKNOWN | ||
| Classifier: Development Status :: 5 - Production/Stable | ||
| Classifier: Intended Audience :: Developers | ||
| Classifier: License :: OSI Approved :: BSD License | ||
| Classifier: Programming Language :: Python | ||
| Classifier: Programming Language :: Python :: 2 | ||
| Classifier: Programming Language :: Python :: 2.6 | ||
| Classifier: Programming Language :: Python :: 2.7 | ||
| Classifier: Programming Language :: Python :: 3 | ||
| Classifier: Programming Language :: Python :: 3.2 | ||
| Classifier: Programming Language :: Python :: 3.3 | ||
| Classifier: Programming Language :: Python :: 3.4 | ||
| Classifier: Topic :: Software Development :: Libraries | ||
| Requires: six | ||
| Requires-Dist: six (>=1.5) | ||
| The dateutil module provides powerful extensions to the | ||
| datetime module available in the Python standard library. | ||
| {"license": "Simplified BSD", "name": "python-dateutil", "metadata_version": "2.0", "generator": "bdist_wheel (0.24.0)", "summary": "Extensions to the standard Python datetime module", "run_requires": [{"requires": ["six (>=1.5)"]}], "version": "2.4.1", "extensions": {"python.details": {"project_urls": {"Home": "https://dateutil.readthedocs.org"}, "document_names": {"description": "DESCRIPTION.rst"}, "contacts": [{"role": "author", "email": "me@jarondl.net", "name": "Yaron de Leeuw"}]}}, "requires": "six", "classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Software Development :: Libraries"], "extras": []} |
| dateutil/easter.py,sha256=s5WUaq8pYpm-9rBwbiFB3plArYbxO3sFe7y4-tbOgcQ,2611 | ||
| dateutil/parser.py,sha256=o6izJvqDo6K8ajDQuW-_oed54rJ2lD9-Rcv6Se2Nq70,42872 | ||
| dateutil/relativedelta.py,sha256=491v5I8ox30bv4Q9IDngPk8KGky6dTnx9cirbhCQJR0,18172 | ||
| dateutil/rrule.py,sha256=h5Zu85HtT9_L6CyjryRNeeuAyYhM2TY_JNwbzhifpWo,52785 | ||
| dateutil/tz.py,sha256=dxbDFvrxPVfk9XJVZ92yfY1hSiQeK6EOcZYNtatINk0,34097 | ||
| dateutil/tzwin.py,sha256=4XmHdYROsjRXSVW8lHKZWETUBcjfGRd8Wjfb43JqOqM,6149 | ||
| dateutil/__init__.py,sha256=7Kuj-e8S2e2amAn3w2WsPx9KC2eFYUfmKToiMnssM24,46 | ||
| dateutil/zoneinfo/dateutil-zoneinfo.tar.gz,sha256=N_GkwIjM-CIwFP-CP2ZzuWp-fo16-dC7Xhyx_1Gl7cs,150061 | ||
| dateutil/zoneinfo/__init__.py,sha256=iozNXC8T9F5aSO5EtKovgpr_G8YSvzhA9QYaUc2c4bU,3980 | ||
| python_dateutil-2.4.1.dist-info/DESCRIPTION.rst,sha256=rN6zJGodjklStllMyiMzSrQEbSBx0MgP7t0rXcFi68Q,116 | ||
| python_dateutil-2.4.1.dist-info/METADATA,sha256=9meBGff9YVWOdTp7pxyb6uWJE_JtJiRU9LWI7y-OUKo,1037 | ||
| python_dateutil-2.4.1.dist-info/metadata.json,sha256=jrHcEjUFrjcXLl16iJNLGmQhmowKMWRyzBcg2yl_8RE,1029 | ||
| python_dateutil-2.4.1.dist-info/RECORD,, | ||
| python_dateutil-2.4.1.dist-info/top_level.txt,sha256=4tjdWkhRZvF7LA_BYe_L9gB2w_p2a-z5y6ArjaRkot8,9 | ||
| python_dateutil-2.4.1.dist-info/WHEEL,sha256=56WjMPRUEpmb30QaTzVbQCpri5lzKGby5HLDkAMQeIU,116 | ||
| python_dateutil-2.4.1.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2 |
| Wheel-Version: 1.0 | ||
| Generator: bdist_wheel (0.24.0) | ||
| Root-Is-Purelib: true | ||
| Tag: py2-none-any | ||
| Tag: py3-none-any | ||
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
515549
Infinity%26
Infinity%7468
Infinity%