{ "info": { "author": "Silver Fern Systems", "author_email": "dev@silverfern.io", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.0", "Programming Language :: Python :: 3.1", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": ".. image:: https://img.shields.io/pypi/v/iso8601utils.svg\n :target: https://pypi.python.org/pypi/iso8601utils\n.. image:: https://travis-ci.org/silverfernsys/iso8601utils.svg?branch=master\n :target: https://travis-ci.org/silverfernsys/iso8601utils\n.. image:: https://codecov.io/gh/silverfernsys/iso8601utils/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/silverfernsys/iso8601utils\n.. image:: https://img.shields.io/pypi/l/iso8601utils.svg\n :target: https://pypi.python.org/pypi/iso8601utils\n.. image:: https://img.shields.io/pypi/status/iso8601utils.svg\n :target: https://pypi.python.org/pypi/iso8601utils\n.. image:: https://img.shields.io/pypi/implementation/iso8601utils.svg\n :target: https://pypi.python.org/pypi/iso8601utils\n.. image:: https://img.shields.io/pypi/pyversions/iso8601utils.svg\n :target: https://pypi.python.org/pypi/iso8601utils\n.. image:: https://img.shields.io/pypi/format/iso8601utils.svg\n :target: https://pypi.python.org/pypi/iso8601utils\n.. image:: https://img.shields.io/librariesio/github/silverfernsys/iso8601utils.svg\n\niso8601utils\n=======================\n\nDatastructures and utilities for representing, parsing, and validating ISO 8601 `dates \n`_, `times \n`_, `date-times\n`_, `durations\n`_, and `intervals\n`_.\n\n**Datastructures**\n\n.. code:: python\n\n >>> from iso8601utils import parsers, interval, duration\n\n # Intervals\n >>> i = parsers.interval('R8/2016-08-01T23:10:59.111Z/2016-08-08T00:13:23.001Z')\n >>> i\n iso8601utils.interval(R8/2016-08-01T23:10:59.111000Z/2016-08-08T00:13:23.001000Z)\n\n # Decompose interval into an (int, datetime, datetime, iso8601utils.duration)\n # tuple representing (repeats, start, end, duration)\n >>> tuple(i)\n (8, datetime.datetime(2016, 8, 1, 23, 10, 59, 111000, tzinfo=Z), datetime.datetime(2016, 8, 8, 0, 13, 23, 1000, tzinfo=Z), iso8601utils.duration(P6DT1H2M23.89S))\n\n # Public properties\n >>> i.repeats\n 8\n >>> i.start\n datetime.datetime(2016, 8, 1, 23, 10, 59, 111000, tzinfo=Z)\n >>> i.end\n datetime.datetime(2016, 8, 8, 0, 13, 23, 1000, tzinfo=Z)\n >>> i.duration\n iso8601utils.duration(P6DT1H2M23.89S)\n\n # Durations\n >>> d = parsers.duration('P3Y6M4DT12H30M5S')\n >>> d\n iso8601utils.duration(P3Y6M4DT12H30M5S)\n\n # Decompose duration into a (timedelta, monthdelta) tuple\n >>> tuple(d)\n (datetime.timedelta(4, 45005), MonthDelta(42))\n\n # Public properties\n >>> d.timedelta\n datetime.timedelta(4, 45005)\n >>> d.monthdelta\n MonthDelta(42)\n\n # Add and subtract durations with datetime objects\n >>> from datetime import datetime\n >>> dt = datetime(2016, 11, 4, 4, 49, 4)\n >>> dt + d\n datetime.datetime(2020, 5, 8, 17, 19, 9)\n >>> dt - d\n datetime.datetime(2013, 4, 30, 16, 18, 59)\n\n # Add and subtract durations\n >>> a = duration(years=1, months=5, days=3, hours=12)\n >>> b = duration(days=2, hours=5)\n >>> a + b\n iso8601utils.duration(P1Y5M3DT17H)\n >>> a - b\n iso8601utils.duration(P1Y5M1DT7H)\n\n # Compare durations\n >>> a < b\n False\n >>> a > b\n True\n\n**Parsers**\n\n.. code:: python\n\n >>> from iso8601utils import parsers\n\n # Parse intervals\n >>> parsers.interval('2016-08-01T23:10:59.111Z/2016-08-08T00:13:23.001Z')\n iso8601utils.interval(2016-08-01T23:10:59.111000Z/2016-08-08T00:13:23.001000Z)\n\n >>> parsers.interval('R5/2002-08-15T16:20:05.100+08:10/2002-10-12T17:05:25.020-01:40')\n iso8601utils.interval(R5/2002-08-15T16:20:05.100000+08:10/2002-10-12T17:05:25.020000-01:40)\n\n # Parse durations\n >>> parsers.duration('P3Y6M4DT12H30M5S')\n iso8601utils.duration(P3Y6M4DT12H30M5S)\n\n # Parse times\n >>> parsers.time('13:15+05:10')\n datetime.time(13, 15, tzinfo=+05:10)\n\n # Parse dates\n >>> parsers.date('1981-04-05')\n datetime.date(1981, 4, 5)\n\n # Parse datetimes\n >>> parsers.datetime('2007-08-09T12:30-02:00')\n datetime.datetime(2007, 8, 9, 12, 30, tzinfo=-02:00)\n\n # Parse ordinal dates\n >>> parsers.date('1981-095')\n datetime.date(1981, 4, 5)\n\n # Parse week dates\n >>> parsers.date('2016-W43-1')\n datetime.date(2016, 10, 24)\n\n**Validators**\n\n.. code:: python\n\n # Validate strings\n >>> from iso8601utils import validators\n >>> validators.interval('1999-12-31T16:00:00.000+04:00/P5DT7H')\n True\n >>> validators.interval('23P7DT5H')\n False\n >>> validators.duration('P3Y6M4W7DT12H30M5S')\n True\n >>> validators.duration('23P7DT5H')\n False\n >>> validators.time('13:15+05:10')\n True\n >>> validators.date('1981-04-05')\n True\n >>> validators.date('1981-095')\n True\n >>> validators.date('1981-W43-1')\n True\n >>> validators.date('1981W43-1')\n False\n\n\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/silverfernsys/iso8601utils", "keywords": "iso8601 time date datetime duration interval", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "iso8601utils", "package_url": "https://pypi.org/project/iso8601utils/", "platform": "", "project_url": "https://pypi.org/project/iso8601utils/", "project_urls": { "Homepage": "https://github.com/silverfernsys/iso8601utils" }, "release_url": "https://pypi.org/project/iso8601utils/0.1.2/", "requires_dist": [ "enum34", "monthdelta (==1.0b)", "codecov; extra == 'test'", "coverage; extra == 'test'", "mock; extra == 'test'", "pytest; extra == 'test'" ], "requires_python": "", "summary": "Utilities for parsing ISO 8601 times, dates, datetimes, intervals, and durations", "version": "0.1.2" }, "last_serial": 2472848, "releases": { "0.0.1.dev1": [ { "comment_text": "", "digests": { "md5": "97ffef5609e45863df8647ae1297c5fa", "sha256": "febe53e659c5f4f3a7581092434ee82564260470a9243b8410f56ad7a981a88e" }, "downloads": -1, "filename": "iso8601utils-0.0.1.dev1-py2-none-any.whl", "has_sig": false, "md5_digest": "97ffef5609e45863df8647ae1297c5fa", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 4532, "upload_time": "2016-09-04T08:35:02", "url": "https://files.pythonhosted.org/packages/78/e3/e6ef0e88d54350d257e61ea0cc7e93c5f19b847b9b71d2d6a3733c0498f1/iso8601utils-0.0.1.dev1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e3a713cc59a863bc443f7f3a7a72cc23", "sha256": "e0f5ab18a4cdcc4d45e5b472526950100b1d43e8b9baa16ec943078a119aa805" }, "downloads": -1, "filename": "iso8601utils-0.0.1.dev1.tar.gz", "has_sig": false, "md5_digest": "e3a713cc59a863bc443f7f3a7a72cc23", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4170, "upload_time": "2016-09-04T08:35:05", "url": "https://files.pythonhosted.org/packages/16/66/1e3cbf0adee24e4eb6a16b45c7fb8368097d7a0013dc14bfd8307592c34e/iso8601utils-0.0.1.dev1.tar.gz" } ], "0.0.1.dev2": [ { "comment_text": "", "digests": { "md5": "dfb7814c422f0ab18cc79bbf507d6016", "sha256": "cb478d4452d9422877e60c04e1675207a0daca12736ce77ddc4e9c25cb450dcc" }, "downloads": -1, "filename": "iso8601utils-0.0.1.dev2-py2-none-any.whl", "has_sig": false, "md5_digest": "dfb7814c422f0ab18cc79bbf507d6016", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 4818, "upload_time": "2016-09-04T08:48:48", "url": "https://files.pythonhosted.org/packages/5b/eb/28cc7464ebe1eded134f6bd130606c5db9dc3d13b0e0267c1b1b06601334/iso8601utils-0.0.1.dev2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bd5eaf607f807ac45e64b7bddea9e583", "sha256": "9098521a131eb39858a302f487fbb750b1dcf5ee845376aa3e1dd594e001bd19" }, "downloads": -1, "filename": "iso8601utils-0.0.1.dev2.tar.gz", "has_sig": false, "md5_digest": "bd5eaf607f807ac45e64b7bddea9e583", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4233, "upload_time": "2016-09-04T08:48:51", "url": "https://files.pythonhosted.org/packages/4b/50/13459d2983a9091f88f51cbe4180fb607a0147f8de269759b265fb02a29b/iso8601utils-0.0.1.dev2.tar.gz" } ], "0.0.1.dev3": [ { "comment_text": "", "digests": { "md5": "87b108b5636c8488defce505e8ce1784", "sha256": "f9617156cd715ccd67f5c304ab0e14cade37852b3ebc95d36aa3d8433910e949" }, "downloads": -1, "filename": "iso8601utils-0.0.1.dev3-py2-none-any.whl", "has_sig": false, "md5_digest": "87b108b5636c8488defce505e8ce1784", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 4899, "upload_time": "2016-09-12T05:20:56", "url": "https://files.pythonhosted.org/packages/bb/6b/5efb453b430ed577dd85ee6058ffa447dcb0c7cc09c5c5cce582ad2aba7a/iso8601utils-0.0.1.dev3-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "58cce40f8bfc307f9a53175b94c3b0f3", "sha256": "efdf4810c714387fb6cf6ec3938e6c42dd83a040964ffa3e312c0f8ef13e92d4" }, "downloads": -1, "filename": "iso8601utils-0.0.1.dev3.tar.gz", "has_sig": false, "md5_digest": "58cce40f8bfc307f9a53175b94c3b0f3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4303, "upload_time": "2016-09-12T05:20:59", "url": "https://files.pythonhosted.org/packages/69/83/56422226ca34e6da226b5e1bf64cc8d5d9fc87a31cc9113420894885c039/iso8601utils-0.0.1.dev3.tar.gz" } ], "0.0.1.dev4": [ { "comment_text": "", "digests": { "md5": "0bf42895e8a68c338b566b520d7f98d8", "sha256": "011fbc43a083ba4f6fdb72c7270a189b981f4b2683dd72e9d3c9a9dee6b9f9c4" }, "downloads": -1, "filename": "iso8601utils-0.0.1.dev4-py2-none-any.whl", "has_sig": false, "md5_digest": "0bf42895e8a68c338b566b520d7f98d8", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 4898, "upload_time": "2016-09-12T05:25:52", "url": "https://files.pythonhosted.org/packages/10/62/690f863e27cbcbbe38d6e88abb16bd83ebfebc95645d674d3f164d2c4386/iso8601utils-0.0.1.dev4-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2663db7d9a9b30d6829e0584ba05670b", "sha256": "d5147153027f66845b9ff4ee6cc24ba2bebc6a90ef18a221c0186d28d8279d4e" }, "downloads": -1, "filename": "iso8601utils-0.0.1.dev4.tar.gz", "has_sig": false, "md5_digest": "2663db7d9a9b30d6829e0584ba05670b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4309, "upload_time": "2016-09-12T05:25:55", "url": "https://files.pythonhosted.org/packages/54/34/da45851a963b5d52f2eaa19bff596b0c9d97a6985ce15fb76c0408692040/iso8601utils-0.0.1.dev4.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "c30274bafe02547658e20d5848cfff50", "sha256": "8e7ccc06c2f520167932a7cac311e2679fbea99182007cde3cbccd267c89ae77" }, "downloads": -1, "filename": "iso8601utils-0.0.3-py2-none-any.whl", "has_sig": false, "md5_digest": "c30274bafe02547658e20d5848cfff50", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7281, "upload_time": "2016-10-23T04:24:06", "url": "https://files.pythonhosted.org/packages/a2/cb/80180e72a0f8dacedd0f86c17f054e2c4352a24fecd85d3650382c3c1423/iso8601utils-0.0.3-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b6653fd57a5eebc2d0477ddc797b7785", "sha256": "1722eeb168ee556a4a3e9fd47345cb6d178b6b20c2cdee044cceaeb4779df401" }, "downloads": -1, "filename": "iso8601utils-0.0.3.tar.gz", "has_sig": false, "md5_digest": "b6653fd57a5eebc2d0477ddc797b7785", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6766, "upload_time": "2016-10-23T04:24:10", "url": "https://files.pythonhosted.org/packages/ee/2f/f224aff195e73c009c7ad4bf0b4aa68f2288f30ba4439868e1b9c53fb069/iso8601utils-0.0.3.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "11769f4e13b11ec57888fca6788e694e", "sha256": "fb24f7b265b2db5e2c2991662bd9bec5b4c0ef93cce8a180a6423b9a210511a6" }, "downloads": -1, "filename": "iso8601utils-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "11769f4e13b11ec57888fca6788e694e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8861, "upload_time": "2016-10-26T00:06:08", "url": "https://files.pythonhosted.org/packages/80/f9/2281d65c634cdef07065df13b1e44e446355c690c9469a88411cdf4f6320/iso8601utils-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "07f59a1e2ca79b7914a14ad2f093838e", "sha256": "3365e869ca6c2d8fdf68be8e4416be61875a7da3d3e522343dfef6700d6247bb" }, "downloads": -1, "filename": "iso8601utils-0.1.0.tar.gz", "has_sig": false, "md5_digest": "07f59a1e2ca79b7914a14ad2f093838e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7636, "upload_time": "2016-10-26T00:06:11", "url": "https://files.pythonhosted.org/packages/19/09/8031c44001e1a4ed3854d9f1562c6bc7479db180326293e289ba80aedaa9/iso8601utils-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "e8dcd24d28574d58e3400868cc9500af", "sha256": "098b426ca36a99706488a48fc548c22ab761734159bca5742e254d01e721ea6f" }, "downloads": -1, "filename": "iso8601utils-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e8dcd24d28574d58e3400868cc9500af", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9269, "upload_time": "2016-10-28T05:34:19", "url": "https://files.pythonhosted.org/packages/dd/07/aa0927c9b3910282a399281266b99aeebe31347c4934c3fee873a45402e4/iso8601utils-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7f38a154d1855c3fc90cfcf663ac31e7", "sha256": "49df01e128f3ef247cc4783939b78d8d04e7a7c8f6526ea8d285eb432c3e8d7b" }, "downloads": -1, "filename": "iso8601utils-0.1.1.tar.gz", "has_sig": false, "md5_digest": "7f38a154d1855c3fc90cfcf663ac31e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7955, "upload_time": "2016-10-28T05:34:21", "url": "https://files.pythonhosted.org/packages/cc/0f/e8de10a05540888f17790d29bffab62703706bd938f0dc47dbf61cd7e2b7/iso8601utils-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "d85483f2004c332dd22ff6732c76b02a", "sha256": "b03b47cc006bcb68badffa9b71513553e64fae0e0d14ead0bcb48b90778eed04" }, "downloads": -1, "filename": "iso8601utils-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d85483f2004c332dd22ff6732c76b02a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13672, "upload_time": "2016-11-21T05:39:46", "url": "https://files.pythonhosted.org/packages/fb/a3/4246342d9bf5c6522747cbd76950d9edb5579108e91b4e26128292e5d269/iso8601utils-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8462712f8733b5066ff400b0146e0bc3", "sha256": "59138b8337ed48e94e46df617557a1bf5fd11233409911e3453eb09a3d58b670" }, "downloads": -1, "filename": "iso8601utils-0.1.2.tar.gz", "has_sig": false, "md5_digest": "8462712f8733b5066ff400b0146e0bc3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11801, "upload_time": "2016-11-21T05:39:48", "url": "https://files.pythonhosted.org/packages/f3/19/0290cdc2bed6746a2a0b1b501280c85f422efcea4c4a83aeff5b0093253a/iso8601utils-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d85483f2004c332dd22ff6732c76b02a", "sha256": "b03b47cc006bcb68badffa9b71513553e64fae0e0d14ead0bcb48b90778eed04" }, "downloads": -1, "filename": "iso8601utils-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d85483f2004c332dd22ff6732c76b02a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13672, "upload_time": "2016-11-21T05:39:46", "url": "https://files.pythonhosted.org/packages/fb/a3/4246342d9bf5c6522747cbd76950d9edb5579108e91b4e26128292e5d269/iso8601utils-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8462712f8733b5066ff400b0146e0bc3", "sha256": "59138b8337ed48e94e46df617557a1bf5fd11233409911e3453eb09a3d58b670" }, "downloads": -1, "filename": "iso8601utils-0.1.2.tar.gz", "has_sig": false, "md5_digest": "8462712f8733b5066ff400b0146e0bc3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11801, "upload_time": "2016-11-21T05:39:48", "url": "https://files.pythonhosted.org/packages/f3/19/0290cdc2bed6746a2a0b1b501280c85f422efcea4c4a83aeff5b0093253a/iso8601utils-0.1.2.tar.gz" } ] }