{ "info": { "author": "Kyle Lahnakoski", "author_email": "kyle@lahnakoski.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# `Date` class\n\nA simplified date and time class for time manipulation. This library is intended for personal and business applications where assuming every solar day has 24 * 60 * 60 seconds is considered accurate. [See *GMT vs UTC* below](//#GMT%20vs%20UTC).\n\n\n## Assumptions\n\n* **All time is in GMT** - Timezone math is left to be resolved at the human endpoints: Machines should only be dealing with one type of time; without holes, without overlap, and with minimal context.\n* **Single time type** - There is no distinction between dates, datetime and times; all measurements in the time dimension are handled by one type called `Date`. This is important for treating time as a vector space.\n* **Standard range comparision** - All time range comparisons have been standardized to `min <= value < max`. The minimum is inclusive (`<=`), and the maximum is exclusive (`<`). \n\n\n# `Date` properties\n\n### `Date()` constructor\n\nThe `Date()` method will convert unix timestamps, millisecond timestamps, various string formats and simple time formulas to create a GMT time\n\n\n### `now()` staticmethod ###\n\nReturn `Date` instance with millisecond resolution (in GMT).\n\n### `eod()` staticmethod ###\n\nReturn end-of-day: Smallest `Date` which is greater than all time points in today. Think of it as tomorrow. Same as `now().ceiling(DAY)`\n\n### `today()` staticmethod ###\n\nThe beginning of today. Same as `now().floor(DAY)`\n\n\n### range(min, max, interval) staticmethod ###\n\nReturn an explicit list of `Dates` starting with `min`, each `interval` more than the last, but now including `max`. Used in defining partitions in time domains.\n\n\n### `floor(duration=None)` method\n\nThis method is usually used to perform date comparisons at the given resolution (aka `duration`). Round down to the nearest whole duration. `duration` as assumed to be `DAY` if not provided.\n\n### `format(format=\"%Y-%m-%d %H:%M:%S\")` method\n\nJust like `strftime`\n\n### `milli` property\n\nNumber of milliseconds since epoch\n\n### `unix` property\n\nNumber of seconds since epoch\n\n\n### `add(duration)` method\n\nAdd a `duration` to the time to get a new `Date` instance. The `self` is not modified.\n\n### `addDay()` method\n\nConvenience method for `self.add(DAY)`\n\n\n# `Duration` class\n\nRepresents the difference between two `Dates`. There are two scales:\n\n* **`DAY` scale** - includes seconds, minutes, hours, days and weeks.\n* **`YEAR` scale** - includes months, quarters, years, and centuries.\n\n### `Duration()` constructor\n\nCreate a new `Duration` by name, by formula, by `timespan`, or (more rarely) number of milliseconds.\n\n### `floor(interval=None)` method\n\nRound down to nearest `interval` size.\n\n### `seconds` property\n\nreturn total number of seconds (including partial) in this duration (estimate given for `YEAR` scale)\n\n### `total_seconds()` method ###\n\nSame as the `seconds` property\n\n### `round(interval, decimal=0)` method ###\n\nReturn number of given `interval` rounded to given `decimal` places\n\n### `format(interval, decimal=0)` method ###\n\nReturn a string representing `self` using given `interval` and `decimal` rounding\n\n\n# Time Vector Space\n\nThe `Date` and `Duration` objects are the point and vectors in a one dimensional vector space. As such, the `+` and `-` operators are allowed. Comparisons with (`>`, `>=`, `<=`, `<`) are also supported.\n\n\n## GMT vs UTC\n\nThe solar day is he most popular timekeeping unit. This library chose GMT (UT1) for its base clock because of its consistent seconds in a solar day. UTC suffers from inconsistent leap seconds and makes time-math difficult, even while forcing us to make pedantic conclusions like some minutes do not have 60 seconds. Lucky for us Python's implementation of UTC (`datetime.utcnow()`) is wrong, and implements GMT: Which is what we use.\n\n## Error Analysis\n\nAssuming we need a generous leap second each 6 months (the past decade saw only 4 leap seconds), then GMT deviates from UTC by up to 1 seconds over 181 days (December to June, 15,638,400 seconds) which is an error rate `error = 1/15,638,400 = 0.000006395%`. If we want to call the error \"noise\", we have a 70dB signal/noise ratio. All applications that can tolerate this level of error should use GMT as their time basis.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/klahnakoski/mo-times", "keywords": "", "license": "MPL 2.0", "maintainer": "", "maintainer_email": "", "name": "mo-times", "package_url": "https://pypi.org/project/mo-times/", "platform": "", "project_url": "https://pypi.org/project/mo-times/", "project_urls": { "Homepage": "https://github.com/klahnakoski/mo-times" }, "release_url": "https://pypi.org/project/mo-times/2.53.19239/", "requires_dist": null, "requires_python": "", "summary": "More Time! Time as a vector space, the way it was meant to be.", "version": "2.53.19239" }, "last_serial": 5738239, "releases": { "1.0.17035": [ { "comment_text": "", "digests": { "md5": "af8f928e88ceda90d361548d64f4d08b", "sha256": "2b76e58d78fcf44b3c9ec228d59c7ce9cb50f055b828c4e59f46d65dd768a26a" }, "downloads": -1, "filename": "mo_times-1.0.17035-py2.7.egg", "has_sig": false, "md5_digest": "af8f928e88ceda90d361548d64f4d08b", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 97661, "upload_time": "2017-02-03T19:59:14", "url": "https://files.pythonhosted.org/packages/d5/d1/b4387bb4132982f3a344ac472dbb7316710105403f2f7187288f46b800de/mo_times-1.0.17035-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "f88e65b9a7e78d388cfb92efd2dc0379", "sha256": "96a69e82d5c85bc16bfc0d2ccdb4011e9717d4ee13d0be327dbfe72fa70aa3bc" }, "downloads": -1, "filename": "mo-times-1.0.17035.zip", "has_sig": false, "md5_digest": "f88e65b9a7e78d388cfb92efd2dc0379", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 50290, "upload_time": "2017-02-03T19:59:41", "url": "https://files.pythonhosted.org/packages/50/d0/b188c2525c3a74562620ee1a432a89c43305bf5bacbf7870cb10bfb9de1c/mo-times-1.0.17035.zip" } ], "1.0.17039": [ { "comment_text": "", "digests": { "md5": "0cd04f0f4682efd1283d9d678c7d1d77", "sha256": "029c4d3e068b49ad30382144fa2b1855300395e3b4c8443f89e5aac9e32408d0" }, "downloads": -1, "filename": "mo_times-1.0.17039-py2.7.egg", "has_sig": false, "md5_digest": "0cd04f0f4682efd1283d9d678c7d1d77", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 97688, "upload_time": "2017-02-07T15:26:10", "url": "https://files.pythonhosted.org/packages/53/fa/086507b9209e81eed0e4332972604b8113710599366a5564036bde4f900c/mo_times-1.0.17039-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "93bc7ba2682e44c85859bf5db1b74579", "sha256": "f821ec6c43ed9549869e0a2af03626646011c20caa9fa3c143f1def5f7e3efab" }, "downloads": -1, "filename": "mo-times-1.0.17039.zip", "has_sig": false, "md5_digest": "93bc7ba2682e44c85859bf5db1b74579", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 50301, "upload_time": "2017-02-07T15:26:15", "url": "https://files.pythonhosted.org/packages/15/0f/7d80948a2df7cf3bb1a3c479fded43f4a37ee35a8e881415cfac67d7cf43/mo-times-1.0.17039.zip" } ], "1.0.17041": [ { "comment_text": "", "digests": { "md5": "4f5e190d1f975de5ae59801caeeead2f", "sha256": "8f6c5db28aaa3d63721eb23134837361e580af7d903423cbb00e5d9631aab04a" }, "downloads": -1, "filename": "mo_times-1.0.17041-py2.7.egg", "has_sig": false, "md5_digest": "4f5e190d1f975de5ae59801caeeead2f", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 43425, "upload_time": "2017-02-09T16:49:17", "url": "https://files.pythonhosted.org/packages/8e/d0/5b7aee5519d260907ebf6b1d3743e61375653732409ac80db028a03e004c/mo_times-1.0.17041-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "19e1fa5c5410e322ca99786363dd6772", "sha256": "07af94e97bac2c764a2ec3df8583f5bc1c7869a130e8f0bbbbcc405e6cf11ccf" }, "downloads": -1, "filename": "mo-times-1.0.17041.zip", "has_sig": false, "md5_digest": "19e1fa5c5410e322ca99786363dd6772", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 50294, "upload_time": "2017-02-09T16:49:23", "url": "https://files.pythonhosted.org/packages/74/36/ccca8e49090dd73d731284b1d8fa2ca098568d9ad8b372d793b4cc2937b9/mo-times-1.0.17041.zip" } ], "1.0.17049": [ { "comment_text": "", "digests": { "md5": "8c1509e9732f7248b19a0a40fb34a446", "sha256": "fc0375c3c9da56183a68bb57a90ea67613bb059dcb77cfb584f310c9cf0e5f9b" }, "downloads": -1, "filename": "mo_times-1.0.17049-py2.7.egg", "has_sig": false, "md5_digest": "8c1509e9732f7248b19a0a40fb34a446", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 43427, "upload_time": "2017-02-18T02:09:12", "url": "https://files.pythonhosted.org/packages/47/a5/6f9c5319676a88c77d61d61a09c2905bfce82fd871c4764b0e8dd731b13e/mo_times-1.0.17049-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "c53445bc23eafd09d3fb9ef2592e6f15", "sha256": "e64b0c5843e07eb719a59e5db680baa4d79ab37d1481c9f2d2aca4cda2428cb4" }, "downloads": -1, "filename": "mo-times-1.0.17049.zip", "has_sig": false, "md5_digest": "c53445bc23eafd09d3fb9ef2592e6f15", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 50298, "upload_time": "2017-02-18T02:09:17", "url": "https://files.pythonhosted.org/packages/c9/6b/b45f9ac9b3c82de216e40c457b83666041053d4e9a7f2cfb6824654302c2/mo-times-1.0.17049.zip" } ], "1.0.17056": [ { "comment_text": "", "digests": { "md5": "a0ff38eb3e75ccafb565ea538cd1f854", "sha256": "7a4be7048d246aaa5eb14413669d8bb68e1578a787fb91caf509b005c356c994" }, "downloads": -1, "filename": "mo_times-1.0.17056-py2.7.egg", "has_sig": false, "md5_digest": "a0ff38eb3e75ccafb565ea538cd1f854", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 43369, "upload_time": "2017-02-25T20:28:29", "url": "https://files.pythonhosted.org/packages/54/3c/9429c6629b3e1d551034d8bbbaadeabd6d7760d1d2fe5428d2f7901c8a35/mo_times-1.0.17056-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "d846fc3419e8ff15ae07b65eee280655", "sha256": "b1d8a079d7326c175faf076c9818bed68180f6f719940ddbf4ddc13ba8282a9e" }, "downloads": -1, "filename": "mo-times-1.0.17056.zip", "has_sig": false, "md5_digest": "d846fc3419e8ff15ae07b65eee280655", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 50241, "upload_time": "2017-02-25T20:28:33", "url": "https://files.pythonhosted.org/packages/07/a5/708e0ba1e70c4515e5146a96b18f9304d517dfade1059f626f184dda3a4f/mo-times-1.0.17056.zip" } ], "1.0.17085": [ { "comment_text": "", "digests": { "md5": "160c1ec1b424b20e0c6ac55309959aab", "sha256": "60d3024cb887cb976774b12ec7b85e8ec2120dd2c1944a9493b0e10962fa3470" }, "downloads": -1, "filename": "mo_times-1.0.17085-py2.7.egg", "has_sig": false, "md5_digest": "160c1ec1b424b20e0c6ac55309959aab", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 43502, "upload_time": "2017-03-26T12:36:28", "url": "https://files.pythonhosted.org/packages/0f/0f/ef71cb8ed8613a145d3f698ed4f797d65943c3bf202cea2946dcddb91ff0/mo_times-1.0.17085-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "57520c59d0f642e1e70f4befee477c9d", "sha256": "b1792d4c5928b81a244b1cb5b96099bababb22bf7602a8cbdb2aead17a4d3621" }, "downloads": -1, "filename": "mo-times-1.0.17085.zip", "has_sig": false, "md5_digest": "57520c59d0f642e1e70f4befee477c9d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 50425, "upload_time": "2017-03-26T12:36:32", "url": "https://files.pythonhosted.org/packages/3b/d7/cd24d69e5c735944980ae0501b5008dab23566a401cb3aeea6f9e7593bf1/mo-times-1.0.17085.zip" } ], "1.0.17131": [ { "comment_text": "", "digests": { "md5": "441dfb028e3a0cc402e9a8a5626b4307", "sha256": "eb2448fa46882dcea7351c06e2fef0e3fb0125b4ecd3817b5f4cdfc08fc5b5a9" }, "downloads": -1, "filename": "mo-times-1.0.17131.zip", "has_sig": false, "md5_digest": "441dfb028e3a0cc402e9a8a5626b4307", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 51348, "upload_time": "2017-05-11T13:42:09", "url": "https://files.pythonhosted.org/packages/8e/b4/96bf94e74611fa2faaa6a328c5f6f31b51a13705be0d195dbd396c28b196/mo-times-1.0.17131.zip" } ], "1.0.17227": [ { "comment_text": "", "digests": { "md5": "146a8c39b74e98f7d7549c7c7e84a6b6", "sha256": "c8479990db1c294989289c56db058749d41656ef866574319a48fea901f6f6c5" }, "downloads": -1, "filename": "mo-times-1.0.17227.zip", "has_sig": false, "md5_digest": "146a8c39b74e98f7d7549c7c7e84a6b6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 51352, "upload_time": "2017-08-15T12:57:01", "url": "https://files.pythonhosted.org/packages/70/bf/ef0751b563d3410b225160063f0ac33d2219b9ebb73f99c2db25c611b8ee/mo-times-1.0.17227.zip" } ], "1.0.17256": [ { "comment_text": "", "digests": { "md5": "73f32e1e7edd3bf15c49cb87e6d8ab55", "sha256": "63a99516a785035782b5c3a6004a030bef55335adda17e2f694de0ed1e47ff23" }, "downloads": -1, "filename": "mo-times-1.0.17256.zip", "has_sig": false, "md5_digest": "73f32e1e7edd3bf15c49cb87e6d8ab55", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 51437, "upload_time": "2017-09-13T15:00:22", "url": "https://files.pythonhosted.org/packages/ab/b9/ae81d73d0f0700d1d889b375d5df5f2ce8b33a7bf7858d9f0414286e725c/mo-times-1.0.17256.zip" } ], "1.1.17256": [ { "comment_text": "", "digests": { "md5": "f4868430cecbd8a2b13ee774b851444b", "sha256": "13b22f635e9638c2c0bc2506fa31e9c03b99beaf001cff1d210570d31b9b9ce9" }, "downloads": -1, "filename": "mo-times-1.1.17256.zip", "has_sig": false, "md5_digest": "f4868430cecbd8a2b13ee774b851444b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 51449, "upload_time": "2017-09-13T15:05:04", "url": "https://files.pythonhosted.org/packages/eb/b4/e6c4b3f73164657006b68246b4a96a08eee2e8d638638bce12fa14545d03/mo-times-1.1.17256.zip" } ], "1.6.18033": [ { "comment_text": "", "digests": { "md5": "ebc24221b2953d0768c53c129fc12034", "sha256": "d59ae2de98d568523838efe464f234b4bcaceeb067e219d8b850453c43e043de" }, "downloads": -1, "filename": "mo-times-1.6.18033.tar.gz", "has_sig": false, "md5_digest": "ebc24221b2953d0768c53c129fc12034", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39650, "upload_time": "2018-02-02T18:30:10", "url": "https://files.pythonhosted.org/packages/fb/bc/06b713ab22ea9515b3393c3ad63f4a73d58c04993afa5bd8ba6bdf39e4d4/mo-times-1.6.18033.tar.gz" } ], "1.6.18097": [ { "comment_text": "", "digests": { "md5": "edfd745928aef85d6d44f206fac649b9", "sha256": "a3499aa42318aa2da2e78577a939a4d71646a64ac30035e0f6394f89fa94e8a4" }, "downloads": -1, "filename": "mo-times-1.6.18097.tar.gz", "has_sig": false, "md5_digest": "edfd745928aef85d6d44f206fac649b9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39660, "upload_time": "2018-04-07T10:49:28", "url": "https://files.pythonhosted.org/packages/42/bc/8ae501c1d123e6cabc7721f937994e83dc8509da560191bcf9e88ece41cc/mo-times-1.6.18097.tar.gz" } ], "2.16.18199": [ { "comment_text": "", "digests": { "md5": "881f7931073190e4604b4022d2909267", "sha256": "2231bd79775cc99af92f12ad07460466beaa873dbb5ada46d5bf90e034549998" }, "downloads": -1, "filename": "mo-times-2.16.18199.tar.gz", "has_sig": false, "md5_digest": "881f7931073190e4604b4022d2909267", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39763, "upload_time": "2018-07-18T12:17:50", "url": "https://files.pythonhosted.org/packages/f4/0b/c57d1a7f6188ef79275634df02dfe9eb27879b46102f2930991b57e67489/mo-times-2.16.18199.tar.gz" } ], "2.18.18240": [ { "comment_text": "", "digests": { "md5": "8c0321ff0d238701fe4c757cb777a8d3", "sha256": "385d1cf58ba3626f3ea0242cc2a02e9bec40a31bb9871c72c5e2806b45578c66" }, "downloads": -1, "filename": "mo-times-2.18.18240.tar.gz", "has_sig": false, "md5_digest": "8c0321ff0d238701fe4c757cb777a8d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39815, "upload_time": "2018-08-28T13:17:45", "url": "https://files.pythonhosted.org/packages/d6/7c/3f3e51be78e39b5ea038b32ec285fa65716c67be30fc504ef712c7831276/mo-times-2.18.18240.tar.gz" } ], "2.27.18331": [ { "comment_text": "", "digests": { "md5": "9dfd01a96a5b3eadcb8921f82a56e94c", "sha256": "6de563090365f8bc4db8348a7da8672e4188355a84270afd445e5f78e5173d8d" }, "downloads": -1, "filename": "mo-times-2.27.18331.tar.gz", "has_sig": false, "md5_digest": "9dfd01a96a5b3eadcb8921f82a56e94c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39052, "upload_time": "2018-11-27T20:16:12", "url": "https://files.pythonhosted.org/packages/00/da/5e436d07c198ca6f355c86d56fbd7b54cceee433ebf904124d27b8538a25/mo-times-2.27.18331.tar.gz" } ], "2.31.19025": [ { "comment_text": "", "digests": { "md5": "66e0c435489088f6eaa8bb3423fbca6b", "sha256": "fa72453bbb19925534c1956cd7fda70e1bc55d598ccd410e24eb9be4bc2d6fbe" }, "downloads": -1, "filename": "mo-times-2.31.19025.tar.gz", "has_sig": false, "md5_digest": "66e0c435489088f6eaa8bb3423fbca6b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39094, "upload_time": "2019-01-26T00:04:31", "url": "https://files.pythonhosted.org/packages/9d/b1/a77931baf42eea051336ee13f360037c8f6e955fe1e6c3811cbb5039cec9/mo-times-2.31.19025.tar.gz" } ], "2.40.19027": [ { "comment_text": "", "digests": { "md5": "e2ccb04c716866c76a536ac5c6b6db19", "sha256": "9296fee6b4f5de8cba307b0ab8b447f8a63b076cc042dbcfdb509b3f6a60510f" }, "downloads": -1, "filename": "mo-times-2.40.19027.tar.gz", "has_sig": false, "md5_digest": "e2ccb04c716866c76a536ac5c6b6db19", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39120, "upload_time": "2019-01-27T01:51:26", "url": "https://files.pythonhosted.org/packages/2a/f9/3494903be7f9ad7a012dc6c21a503ca5e79f42b185094fc24269627ec4e8/mo-times-2.40.19027.tar.gz" } ], "2.53.19239": [ { "comment_text": "", "digests": { "md5": "29884713eedf56e9f7d800b836240ce6", "sha256": "829f5477bb33755c68841a962b06947b1f3e3b1efe24369ea76d55469b28423a" }, "downloads": -1, "filename": "mo-times-2.53.19239.tar.gz", "has_sig": false, "md5_digest": "29884713eedf56e9f7d800b836240ce6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39128, "upload_time": "2019-08-27T17:22:50", "url": "https://files.pythonhosted.org/packages/89/18/f58324344b0a1fbfee76e72edb9fcafc6bff1d8942ecfc0a61550004814e/mo-times-2.53.19239.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "29884713eedf56e9f7d800b836240ce6", "sha256": "829f5477bb33755c68841a962b06947b1f3e3b1efe24369ea76d55469b28423a" }, "downloads": -1, "filename": "mo-times-2.53.19239.tar.gz", "has_sig": false, "md5_digest": "29884713eedf56e9f7d800b836240ce6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39128, "upload_time": "2019-08-27T17:22:50", "url": "https://files.pythonhosted.org/packages/89/18/f58324344b0a1fbfee76e72edb9fcafc6bff1d8942ecfc0a61550004814e/mo-times-2.53.19239.tar.gz" } ] }