{ "info": { "author": "Ulf Bartel", "author_email": "elastic.code@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "Python-MomentX\n==============\n\n[![Travis CI](https://travis-ci.org/berlincode/momentx.svg?branch=master&style=flat)](https://travis-ci.org/berlincode/momentx)\n[![Python versions](https://img.shields.io/pypi/pyversions/momentx.svg)](https://pypi.python.org/pypi/momentx/)\n[![new-style BSD](https://img.shields.io/pypi/l/momentx.svg)](https://github.com/berlincode/momentx/blob/master/LICENSE.txt)\n\n\nA lightweight wrapper around datetime with a focus on timezone handling and\nfew dependencies (only datetime, pytz and six).\n\nProvides a immutable date/time type that always has an attached timezone. \n\nThis module was originally derived from the [moment module](https://github.com/zachwill/moment)\nby Zach Williams. Following the main differences:\n\n * MomentX dates always contain a timezone\n * comparison made easy because all MomentX objects are timezone-offset-aware\n * strptime with timezone support (%z)\n * MomentX objects are immutable (add(), replace(), etc does not alter the object)\n * api methods were converted to @classmethod\n * zero() is now a method and not a property\n * python3 support\n * removed js like date formatting options and 'times' dependency\n\nTypical usage may look like this:\n```\n\n>>> from momentx import MomentX\n>>> \n>>> MomentX.utc(2012, 12, 18)\n\n>>> \n>>> MomentX(2012, 12, 18, timezone=\"UTC\")\n\n>>> \n>>> MomentX(2012, 12, 18, timezone=\"Europe/Berlin\")\n\n>>> \n>>> MomentX(2012, 12, 18, timezone=\"Europe/Berlin\").astimezone(\"UTC\")\n\n>>> \n>>> MomentX(2012, 12, 18, 10, 11, 12, timezone=\"UTC\").replace(hours=3)\n\n>>> \n>>> MomentX(2012, 12, 18, 10, 11, 12, timezone=\"UTC\").zero()\n\n>>> \n>>> MomentX.utc(2012, 12, 18).add(days=2)\n\n>>> \n>>> MomentX.utcnow()\n\n>>> \n>>> MomentX.utcnow().strftime('%Y-%m-%d %H:%M:%S%z')\n'2016-05-17 18:31:20+0000'\n\n```\n\nPublic repository\n-----------------\n\nhttps://github.com/berlincode/momentx\n\n\nLicense\n-------\n\nCode and documentation copyright Ulf Bartel. Code is licensed under the\n[new-style BSD license](./LICENSE.txt).\n\n\n\nv0.1.0, 2016-05-17 -- Initial public release.\nv0.2.0, 2017-08-26 -- added epoch seconds as possible input for momentx(), fix division, added tests, cleanup\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/berlincode/momentx", "keywords": "datetime", "license": "new-style BSD", "maintainer": "", "maintainer_email": "", "name": "momentx", "package_url": "https://pypi.org/project/momentx/", "platform": "", "project_url": "https://pypi.org/project/momentx/", "project_urls": { "Homepage": "https://github.com/berlincode/momentx" }, "release_url": "https://pypi.org/project/momentx/0.2.3/", "requires_dist": null, "requires_python": "", "summary": "A lightweight wrapper around datetime with a focus on timezone handling and few dependencies (datetime, pytz and six).", "version": "0.2.3" }, "last_serial": 3199152, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "f28d901560cfbccf2b715a7211ac8c81", "sha256": "7698db3d94dd8e5bf17cff93e1034d257f923cbc9226f1122943bcf2db68d0ad" }, "downloads": -1, "filename": "momentx-0.1.0.tar.gz", "has_sig": false, "md5_digest": "f28d901560cfbccf2b715a7211ac8c81", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8645, "upload_time": "2016-05-17T19:07:13", "url": "https://files.pythonhosted.org/packages/64/0b/690aed5b9586a71ace5b245b2dcb50063162467a9bbf4b13c90b7cf9bac5/momentx-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "2712c1995e9e55e2671994d97aefc876", "sha256": "81c7aa486950360df09b3be0527f757320acfb730f29bcf5d7414e7c07f295d4" }, "downloads": -1, "filename": "momentx-0.2.0.tar.gz", "has_sig": false, "md5_digest": "2712c1995e9e55e2671994d97aefc876", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6691, "upload_time": "2017-08-26T08:56:46", "url": "https://files.pythonhosted.org/packages/4b/5d/6141e84c83a8f72ab1a5121d128b6a1736b88adb0e63f37c2a718f851fb4/momentx-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "8b54f22fbd2d0b2617f3fb0242d32432", "sha256": "06edfaee3604491b645f3a8e2d6340778843ffd7c407ab1021d40c43f75977f8" }, "downloads": -1, "filename": "momentx-0.2.1.tar.gz", "has_sig": false, "md5_digest": "8b54f22fbd2d0b2617f3fb0242d32432", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7067, "upload_time": "2017-08-31T17:15:37", "url": "https://files.pythonhosted.org/packages/e5/6d/3f683195bcb6a2a9cb111c14014d8643f16b1f4c4490d7492b7fd6c7de23/momentx-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "83af550f316e0bc1c6bf24f7ca8a7d55", "sha256": "9da0ae172be609da2042ec96402166e248ca0c13b04835117a5da553b4912b6b" }, "downloads": -1, "filename": "momentx-0.2.2.tar.gz", "has_sig": false, "md5_digest": "83af550f316e0bc1c6bf24f7ca8a7d55", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7324, "upload_time": "2017-09-01T23:11:47", "url": "https://files.pythonhosted.org/packages/1b/52/232c06b27ff4958a3a34003bfb6c76d469a4bfcc685b09e5e338946b2b11/momentx-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "938bb5e4e88730814874ebccecd609c0", "sha256": "036768814c6dc30503f37a7c3a76276ce90bebe23d06e72d7313ae7bfc39e233" }, "downloads": -1, "filename": "momentx-0.2.3.tar.gz", "has_sig": false, "md5_digest": "938bb5e4e88730814874ebccecd609c0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7349, "upload_time": "2017-09-24T21:12:26", "url": "https://files.pythonhosted.org/packages/36/d3/d412998167aaf5ccf2a18f51211c67b0fdaded04b3846eab013b1c9eec60/momentx-0.2.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "938bb5e4e88730814874ebccecd609c0", "sha256": "036768814c6dc30503f37a7c3a76276ce90bebe23d06e72d7313ae7bfc39e233" }, "downloads": -1, "filename": "momentx-0.2.3.tar.gz", "has_sig": false, "md5_digest": "938bb5e4e88730814874ebccecd609c0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7349, "upload_time": "2017-09-24T21:12:26", "url": "https://files.pythonhosted.org/packages/36/d3/d412998167aaf5ccf2a18f51211c67b0fdaded04b3846eab013b1c9eec60/momentx-0.2.3.tar.gz" } ] }