{ "info": { "author": "Wim Glenn", "author_email": "hey@wimglenn.com", "bugtrack_url": null, "classifiers": [], "description": "Installation\n------------\n\n``pip install readabledelta``\n\n\nUsage examples\n--------------\n\nThe ``readabledelta`` is just a more human-friendly printable version of ``timedelta``. The public interface is equivalent to timedelta, only printing behaviour has been modified.\n\nIt's easy to confuse hours/minutes with minutes/seconds in the default formatting of timedeltas\n\n>>> lunchtime = datetime(year=2015, month=5, day=27, hour=12)\n>>> right_now = datetime(year=2015, month=5, day=27, hour=13, minute=5)\n>>> 'Lunch was {} ago'.format(delta)\n'Lunch was 1:05:00 ago'\n>>> 'Lunch was {} ago'.format(readabledelta(delta))\n'Lunch was 1 hour and 5 minutes ago'\n\nFor negative timedeltas, the default representation is more machine-friendly than human-friendly: \"an hour and five minutes\" back is easier for people to understand than the weird but technically-correct \"negative one day plus 22 hours and 55 minutes\"\n\n>>> '{}'.format(lunchtime - right_now)\n'-1 day, 22:55:00'\n>>> '{}'.format(readabledelta(lunchtime - right_now))\n'-1 hour and 5 minutes'\n\nA readabledelta *is a* timedelta, compares as you'd expect, and is simple enough not to misbehave.\n\n>>> issubclass(readabledelta, timedelta)\nTrue\n>>> isinstance(readabledelta(), timedelta)\nTrue\n>>> readabledelta() == timedelta()\nTrue\n\nThis means you can safely add or subtract them to ``datetime`` instances, there will be no unpleasant surprises with arithmetic.", "description_content_type": null, "docs_url": "https://pythonhosted.org/readabledelta/", "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/wimglenn/readabledelta", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "readabledelta", "package_url": "https://pypi.org/project/readabledelta/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/readabledelta/", "project_urls": { "Homepage": "https://github.com/wimglenn/readabledelta" }, "release_url": "https://pypi.org/project/readabledelta/0.0.2/", "requires_dist": null, "requires_python": "", "summary": "Human readable modification of timedelta", "version": "0.0.2" }, "last_serial": 2841418, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "b1c3d882b02ef27fa14e265475dd4b50", "sha256": "29120d5d4a0289436f50831406e66496c29994833f413855c0f5beb3b31146d5" }, "downloads": -1, "filename": "readabledelta-0.0.1.tar.gz", "has_sig": false, "md5_digest": "b1c3d882b02ef27fa14e265475dd4b50", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3627, "upload_time": "2015-05-28T03:05:16", "url": "https://files.pythonhosted.org/packages/3c/09/3841acbe7372d816d2d913faec8d7020ea33720d901aff832d4d4f4cca7b/readabledelta-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "e4e3d2c6b4ce5c4f305be82cc39b4b03", "sha256": "8d3b265fc31604ef08b5954ba4bda6d5aa8172811e7a770ea0ecacb585d22234" }, "downloads": -1, "filename": "readabledelta-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e4e3d2c6b4ce5c4f305be82cc39b4b03", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4867, "upload_time": "2017-05-01T05:40:43", "url": "https://files.pythonhosted.org/packages/78/dd/1de5700261c0aecc0cee9a732039d83a3c17395ccc3d809ee2ecb86c710a/readabledelta-0.0.2-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e4e3d2c6b4ce5c4f305be82cc39b4b03", "sha256": "8d3b265fc31604ef08b5954ba4bda6d5aa8172811e7a770ea0ecacb585d22234" }, "downloads": -1, "filename": "readabledelta-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e4e3d2c6b4ce5c4f305be82cc39b4b03", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4867, "upload_time": "2017-05-01T05:40:43", "url": "https://files.pythonhosted.org/packages/78/dd/1de5700261c0aecc0cee9a732039d83a3c17395ccc3d809ee2ecb86c710a/readabledelta-0.0.2-py2.py3-none-any.whl" } ] }