{ "info": { "author": "Thomas Grenfell Smith", "author_email": "thomathom@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "\nNon-Pedantic Time\n*****************\n\nPython's \"datetime\" module has many uses, but it has a difficulty: you\ncan't do any arithmetic with \"datetime.time\". Only with\n\"datetime.datetime\". Now, there are good reasons for this: \"What\ntime will it be, 24 hours from now\" has a lot of corner cases,\nincluding daylight savings time, leap seconds, historical timezone\nchanges, and so on. But sometimes you really *do* need the simple\ncase. Sometimes the perfect is the enemy of the good. And that's why\nyou have this module. This module will allow you to cocoon yourself\nin the comforting illusion that, in 24 hours, it will be the same time\nas it is right now.\n\nAnd what freedom this illusion gives you! You can add a\n\"datetime.timedelta\" object to an \"nptime\" object, and it works! It\nwill cycle around 24 hours, like modular arithmetic. You can ask\n\"what time comes 1 day and 36 minutes after 12:24 pm?\" and it will let\nyou know: 1:00 pm. How lovely!\n\n>>> from nptime import nptime\n>>> from datetime import timedelta, date, datetime\n>>> afternoon = nptime(12, 24) + timedelta(days=1, minutes=36)\n>>> afternoon\nnptime(13, 0)\n>>> str(afternoon)\n'13:00:00'\n\nMaybe we're talking about the afternoon of Guido van Rossum's\nbirthday. Lucky, we can combine \"nptime\" objects with \"date\" objects:\n\n>>> datetime.combine(date(1956, 1, 31), afternoon)\ndatetime.datetime(1956, 1, 31, 13, 0)\n\nYou can also ask \"How long is it between 9:00 AM and 5:00 PM? It sure\nfeels like a million years!\"\n\n>>> workday = nptime(hour=17) - nptime(hour=9)\n>>> workday\ndatetime.timedelta(0, 28800)\n>>> print(workday)\n8:00:00\n\nNope, only 8 hours, how strange. Anyway, please use this module. It\nwill be convenient. But don't use it when talking about concrete\ntime, time in a particular place, or anything like that. In fact, it\ndoesn't even notice \"datetime.tzinfo\" objects right now. Good luck.\n\nNote: You can find the newest version at\n https://github.com/tgs/nptime . You can find online documentation at\n http://tgs.github.com/nptime/ . The package is available for\n download from PyPi: *easy_install nptime*. This software is\n licensed under the 3-clause BSD License.\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/tgs/nptime", "keywords": "time datetime timedelta", "license": "3-clause BSD", "maintainer": "", "maintainer_email": "", "name": "nptime", "package_url": "https://pypi.org/project/nptime/", "platform": "", "project_url": "https://pypi.org/project/nptime/", "project_urls": { "Homepage": "https://github.com/tgs/nptime" }, "release_url": "https://pypi.org/project/nptime/1.1/", "requires_dist": null, "requires_python": "", "summary": "Extends datetime.time, allowing time arithmetic", "version": "1.1" }, "last_serial": 3532276, "releases": { "0.3": [ { "comment_text": "", "digests": { "md5": "b6b765bc4a0b203ccf58be0dfd4b4e2c", "sha256": "bcfcc9316df799585dac8b4203c64a350b75deb89ca5818d6d2bc0b3113cd560" }, "downloads": -1, "filename": "nptime-0.3.tar.gz", "has_sig": false, "md5_digest": "b6b765bc4a0b203ccf58be0dfd4b4e2c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4038, "upload_time": "2011-07-26T21:56:17", "url": "https://files.pythonhosted.org/packages/5d/0c/f8366df0be5bb5c76576f77ffebc902af004ffa11dd8a4a9a582ee46f082/nptime-0.3.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "0d130be82b08edd8e1380a804d04e224", "sha256": "fbe4a386aafc9aedddf56e8128457abb2c7bd2bc5d2fe048d4cde48d3387683e" }, "downloads": -1, "filename": "nptime-0.4.0-py27-none-any.whl", "has_sig": false, "md5_digest": "0d130be82b08edd8e1380a804d04e224", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 6357, "upload_time": "2013-08-12T22:15:55", "url": "https://files.pythonhosted.org/packages/6f/9f/97aa76fdff879bcaaa0ba327ca94254c539536e3b89aa27e7215c88e841f/nptime-0.4.0-py27-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8011ac7fc433ba0484ea94cc603e0de8", "sha256": "2c11e149b34e992e552b71d77ee3686e498180555456dbbc2e4ae8120361f2a2" }, "downloads": -1, "filename": "nptime-0.4.0-py33-none-any.whl", "has_sig": false, "md5_digest": "8011ac7fc433ba0484ea94cc603e0de8", "packagetype": "bdist_wheel", "python_version": "3.3", "requires_python": null, "size": 6350, "upload_time": "2013-08-12T22:16:33", "url": "https://files.pythonhosted.org/packages/a5/fc/396522430f28fc4d79081db468fa1ecfe229fc8fed946675e3cff88ecfbc/nptime-0.4.0-py33-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b78f36b35935a6f23dcb241b9eab32ea", "sha256": "158b8dd99eea6feb5c785432a2b05749807d5e4365c8f779f2363fed26294f63" }, "downloads": -1, "filename": "nptime-0.4.0.tar.gz", "has_sig": false, "md5_digest": "b78f36b35935a6f23dcb241b9eab32ea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4726, "upload_time": "2013-08-12T22:15:53", "url": "https://files.pythonhosted.org/packages/fc/cb/f3ed8f8ac7997cd8ddec92aa21dfd5121a3896135b7c52f694435f7a6df8/nptime-0.4.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "f8277023bbed3d54a1597a9ae46a63f3", "sha256": "909ddbae087f421430418713c68ae0f0aceea2f9e3175c0d7780b30f3c900ba9" }, "downloads": -1, "filename": "nptime-0.4.1-py27-none-any.whl", "has_sig": false, "md5_digest": "f8277023bbed3d54a1597a9ae46a63f3", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 6355, "upload_time": "2015-11-19T03:29:54", "url": "https://files.pythonhosted.org/packages/55/9a/5c0d8213bcf4337a8c2c63f892490358749bbac205409cd1c9c41f3e5ffb/nptime-0.4.1-py27-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ef316e31b7735a446f4381632ddbbe65", "sha256": "f03e35bb1d198366bc4673bdfdfe19334df894ba7d4fbf27a2c1054e29947188" }, "downloads": -1, "filename": "nptime-0.4.1.tar.gz", "has_sig": false, "md5_digest": "ef316e31b7735a446f4381632ddbbe65", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4725, "upload_time": "2015-11-19T03:29:50", "url": "https://files.pythonhosted.org/packages/1f/5d/a679e97f5849431da34f1b59502fdaa2080d819d1f1240f16643e79dc326/nptime-0.4.1.tar.gz" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "26cbce6d716c5c8e20fa49c77cd0e1b8", "sha256": "58350b5ec001ef41db62a310234319fa2fd5c7b2e3cde6b6a2618eff1f7d9eb2" }, "downloads": -1, "filename": "nptime-1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "26cbce6d716c5c8e20fa49c77cd0e1b8", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 6479, "upload_time": "2018-01-25T03:21:19", "url": "https://files.pythonhosted.org/packages/17/a2/1fc339c8bb3e61c2c3d26588664804db5ae276aef204b7c9a2bb1c7d4b50/nptime-1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "86c98fee2f5b7b422abf87ff4f9d86d8", "sha256": "4cc762ab9ae19dff8a037a45bcd8014ea829e975f1f3b9cd4e6398e2dca1c163" }, "downloads": -1, "filename": "nptime-1.0.tar.gz", "has_sig": false, "md5_digest": "86c98fee2f5b7b422abf87ff4f9d86d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4958, "upload_time": "2018-01-25T03:21:17", "url": "https://files.pythonhosted.org/packages/95/e4/68796006fd5a92428184c50cb4ac0a74b5cb2db5fd5c053c9e435d7583fc/nptime-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "e3ee10939e6c23ab20251d732988a0c1", "sha256": "33cca08061ac56fe1dc102ab9ecf3298d1dad59663472c1af178d2ab60de67ea" }, "downloads": -1, "filename": "nptime-1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "e3ee10939e6c23ab20251d732988a0c1", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 6483, "upload_time": "2018-01-29T18:07:47", "url": "https://files.pythonhosted.org/packages/35/59/5b4456966c65ae511957297c7504bda7872423b8f468192d6846eb18d01e/nptime-1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6570a2dae65fa89bebcfff3ebcedddb6", "sha256": "18d3611ffe5f18622fb3402e494a46a7013377e7c61aa9ad991549e148c50b14" }, "downloads": -1, "filename": "nptime-1.1.tar.gz", "has_sig": false, "md5_digest": "6570a2dae65fa89bebcfff3ebcedddb6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5002, "upload_time": "2018-01-29T18:07:46", "url": "https://files.pythonhosted.org/packages/23/18/bedbe299b1a23d7cdd01a0a41e7389c965e528cf044048030f9b01d83fd3/nptime-1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e3ee10939e6c23ab20251d732988a0c1", "sha256": "33cca08061ac56fe1dc102ab9ecf3298d1dad59663472c1af178d2ab60de67ea" }, "downloads": -1, "filename": "nptime-1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "e3ee10939e6c23ab20251d732988a0c1", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 6483, "upload_time": "2018-01-29T18:07:47", "url": "https://files.pythonhosted.org/packages/35/59/5b4456966c65ae511957297c7504bda7872423b8f468192d6846eb18d01e/nptime-1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6570a2dae65fa89bebcfff3ebcedddb6", "sha256": "18d3611ffe5f18622fb3402e494a46a7013377e7c61aa9ad991549e148c50b14" }, "downloads": -1, "filename": "nptime-1.1.tar.gz", "has_sig": false, "md5_digest": "6570a2dae65fa89bebcfff3ebcedddb6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5002, "upload_time": "2018-01-29T18:07:46", "url": "https://files.pythonhosted.org/packages/23/18/bedbe299b1a23d7cdd01a0a41e7389c965e528cf044048030f9b01d83fd3/nptime-1.1.tar.gz" } ] }