{ "info": { "author": "Jonathan Tushman", "author_email": "jonathan@zefr.com", "bugtrack_url": null, "classifiers": [], "description": "human_dates\n===========\n\nI came from the Ruby/Rails world and I missed some of my date sugar. And instead of keeping complaining about it, I\nthought I would do something about it\n\n\nIt offers two sets of functionality:\n\n#. and foremost it has a nice `time_ago_in_words` function.\n#. has some natural language for getting to the beginning and end of things\n\nNote I stole much of this from the following StackOverflow post: http://stackoverflow.com/a/1551394/192791\n\nNote: when you do not pass a time into a function it uses `datetime.utcnow()`\n\n\nInstallation\n------------\n\n.. code-block:: bash\n\n $ pip install human_dates\n\n\ntime_ago_in_words Usage\n-----\n\n.. code-block:: python\n\n from human_dates import time_ago_in_words, beginning_of_day\n\n print time_ago_in_words()\n #prints \"just now\"\n\n print time_ago_in_words(beginning_of_day())\n # prints 8 hours ago\n\n\nNatural Language Helpers\n\n.. code-block:: python\n\n from human_dates import *\n\n print beginning_of_day()\n print beginning_of_hour()\n print beginning_of_year()\n print end_of_month()\n # and so on ....\n\n # you can also pass a datetime to each of these functions\n import human_dates\n from datetime import datetime\n date = datetime.strptime('Feb 13 2008 1:33PM', '%b %d %Y %I:%M%p')\n result = human_dates.end_of_month(date)\n print result\n # 2008-02-29 23:59:59.999999\n\n\nAlternatives\n------------\n\n- Delorean: http://delorean.readthedocs.org/en/latest/quickstart.html (<-- please look at this before using human_dates.\nIt's heavyweight for me but might be great for you)\n\nOther Important Time Libraries\n- DateUtil: http://labix.org/python-dateutil\n- PyTz: http://pytz.sourceforge.net/\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jtushman/human_dates", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "human_dates", "package_url": "https://pypi.org/project/human_dates/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/human_dates/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/jtushman/human_dates" }, "release_url": "https://pypi.org/project/human_dates/0.2.0/", "requires_dist": null, "requires_python": null, "summary": "Dates for humans", "version": "0.2.0" }, "last_serial": 773859, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "d919b7f2f1ec713e6fa514ecc1e12e9b", "sha256": "e7e49280ad08d24d1455182e2fa62d7150bcca75fa7a144cac62906567f35e0c" }, "downloads": -1, "filename": "human_dates-0.1.0.tar.gz", "has_sig": false, "md5_digest": "d919b7f2f1ec713e6fa514ecc1e12e9b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1536, "upload_time": "2013-06-17T13:50:59", "url": "https://files.pythonhosted.org/packages/c2/97/c81423b3bfd2457c5659f27b28cdda76699ed695c0fa650e7eab9a035d87/human_dates-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "28a32cffccff6ee9f6a9c751348cacd6", "sha256": "3df18daf7a47a32482f47cf42482801dc09d54908274c9ce81685dc6fe04c78c" }, "downloads": -1, "filename": "human_dates-0.2.0.tar.gz", "has_sig": false, "md5_digest": "28a32cffccff6ee9f6a9c751348cacd6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2380, "upload_time": "2013-06-18T14:41:24", "url": "https://files.pythonhosted.org/packages/12/f8/7de49a328ed53631e83a8559985ce559d90dd7f395d2a41ab83f95d76055/human_dates-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "28a32cffccff6ee9f6a9c751348cacd6", "sha256": "3df18daf7a47a32482f47cf42482801dc09d54908274c9ce81685dc6fe04c78c" }, "downloads": -1, "filename": "human_dates-0.2.0.tar.gz", "has_sig": false, "md5_digest": "28a32cffccff6ee9f6a9c751348cacd6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2380, "upload_time": "2013-06-18T14:41:24", "url": "https://files.pythonhosted.org/packages/12/f8/7de49a328ed53631e83a8559985ce559d90dd7f395d2a41ab83f95d76055/human_dates-0.2.0.tar.gz" } ] }