{ "info": { "author": "Chris Warrick", "author_email": "chris@chriswarrick.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Utilities" ], "description": "============================\nDate Conditionals (datecond)\n============================\n:Info: This is the README file for Date Conditionals.\n:Author: Chris Warrick \n:Copyright: \u00a9 2016-2017, Chris Warrick.\n:Date: 2017-03-07\n:Version: 0.1.6\n\n.. index: README\n.. image:: https://travis-ci.org/Kwpolska/datecond.svg?branch=master\n :target: https://travis-ci.org/Kwpolska/datecond\n\nPURPOSE\n-------\n\nThis is a minimalistic (and slightly hacky) parser for date range conditionals.\n\nINSTALLATION\n------------\n\n::\n\n pip install datecond\n\nFORMAT\n------\n\n* comma-separated clauses (AND)\n* clause: attribute comparison_operator value (spaces optional)\n * attribute: year, month, day, hour, month, second, weekday, isoweekday or empty for full datetime\n * comparison_operator: == != <= >= < >\n * value: integer, 'now' or dateutil-compatible date input\n\nAPI\n---\n\nThe library exposes only one function:\n\n::\n\n date_in_range(date_range, date, debug=True, now=None)\n\nWhere ``date_range`` is the date conditional (see `FORMAT`_ above),\n``date`` is a datetime object, and ``now`` is the current date (used for 'now'\ncomparisons; if not specified, ``datetime.datetime.now()`` is used)\n\nCLI USAGE\n---------\n\n::\n\n $ python -m datecond\n Date range to accept: year == 2016\n Date to test: 2016-01-01\n Date parsed: 2016-01-01 00:00:00\n <2016 == 2016>\n In range: True\n Date to test: 2016-02-02\n Date parsed: 2016-02-02 00:00:00\n <2016 == 2016>\n In range: True\n Date to test: 2017-01-01\n Date parsed: 2017-01-01 00:00:00\n <2017 == 2016>\n In range: False\n\n $ python -m datecond\n Date range to accept: year == 2016, month > 06, day >= 07\n Date to test: 2016-06-07\n Date parsed: 2016-06-07 00:00:00\n <2016 == 2016>\n <6 > 6>\n <7 >= 7>\n In range: False\n Date to test: 2016-07-07\n Date parsed: 2016-07-07 00:00:00\n <2016 == 2016>\n <7 > 6>\n <7 >= 7>\n In range: True\n Date to test: 2016-08-08\n Date parsed: 2016-08-08 00:00:00\n <2016 == 2016>\n <8 > 6>\n <8 >= 7>\n In range: True\n Date to test: 2015-07-07\n Date parsed: 2015-07-07 00:00:00\n <2015 == 2016>\n <7 > 6>\n <7 >= 7>\n In range: False\n\nCOPYRIGHT\n---------\n\nCopyright \u00a9 2015-2016-2017, Chris Warrick.\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n1. Redistributions of source code must retain the above copyright\n notice, this list of conditions, and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions, and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\n3. Neither the name of the author of this software nor the names of\n contributors to this software may be used to endorse or promote\n products derived from this software without specific prior written\n consent.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\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/Kwpolska/datecond", "keywords": "datecond", "license": "3-clause BSD", "maintainer": "", "maintainer_email": "", "name": "datecond", "package_url": "https://pypi.org/project/datecond/", "platform": "any", "project_url": "https://pypi.org/project/datecond/", "project_urls": { "Homepage": "https://github.com/Kwpolska/datecond" }, "release_url": "https://pypi.org/project/datecond/0.1.6/", "requires_dist": [ "python-dateutil" ], "requires_python": "", "summary": "Parser for date range conditionals.", "version": "0.1.6" }, "last_serial": 2689132, "releases": { "0.1.3": [ { "comment_text": "", "digests": { "md5": "a6e767776d1ebbda16a45401b3fcb51b", "sha256": "490034340926d30dfbd7fa4b7ed75dfa84b1c1c4e80e11e0a1cb6ba68585dab6" }, "downloads": -1, "filename": "datecond-0.1.3-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "a6e767776d1ebbda16a45401b3fcb51b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11463, "upload_time": "2016-07-13T18:37:21", "url": "https://files.pythonhosted.org/packages/94/60/2267de2ce749d7a6b86f0a4b927cc888303e138a9b356c8c28980b9cdd87/datecond-0.1.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c046fd55fbf73c4ad460b3de13104398", "sha256": "4afccca38da2852280ed938de11d8b3257b8c42fe21b7321b38e37465f00a961" }, "downloads": -1, "filename": "datecond-0.1.3.tar.gz", "has_sig": true, "md5_digest": "c046fd55fbf73c4ad460b3de13104398", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11629, "upload_time": "2016-07-13T18:37:23", "url": "https://files.pythonhosted.org/packages/ab/10/9f6769369cd47e77073d9601604187532504e0a482ecc05a568727b6c731/datecond-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "cf1cc5b313b0ba7364cb728cc15cce99", "sha256": "95ec02a51f573b24dfe6d18dede283dd79fd424e50a7d854530209110d7d11a3" }, "downloads": -1, "filename": "datecond-0.1.4-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "cf1cc5b313b0ba7364cb728cc15cce99", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9655, "upload_time": "2016-07-21T08:43:49", "url": "https://files.pythonhosted.org/packages/1d/6e/d58ecd8b36832fc33cc3abd891a7ab9f8e9aceb720ce505ddb0ea16d8130/datecond-0.1.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "09626fe4f48a11900814d4942b5ec20a", "sha256": "da556d82c137847ede15a1f468eb3693ed9593ff7eae4c2f56d9d3a7244b5d77" }, "downloads": -1, "filename": "datecond-0.1.4.tar.gz", "has_sig": true, "md5_digest": "09626fe4f48a11900814d4942b5ec20a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10532, "upload_time": "2016-07-21T08:43:51", "url": "https://files.pythonhosted.org/packages/22/e0/4823a209f33b7801a1d263504cd267254ed37176e54ebeddc60a98ffe72a/datecond-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "d927aae54f43eaad258d04b118eb843e", "sha256": "534431b19236bc0a10b3397724896d1984e6b2c1d17c8a1140b79f90928e1a2e" }, "downloads": -1, "filename": "datecond-0.1.5-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "d927aae54f43eaad258d04b118eb843e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9920, "upload_time": "2017-03-07T15:51:58", "url": "https://files.pythonhosted.org/packages/27/a1/84d776d08239dda533b4fd5fd7bf8cd943d4ee11033464cd64efca6ac39b/datecond-0.1.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d569aede195295ffd688461d188a80c2", "sha256": "7e81352e7a2a04515e76ae07f84b30e52370eb656fbfaf8dc1f5570ece861128" }, "downloads": -1, "filename": "datecond-0.1.5.tar.gz", "has_sig": true, "md5_digest": "d569aede195295ffd688461d188a80c2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10458, "upload_time": "2017-03-07T15:52:00", "url": "https://files.pythonhosted.org/packages/70/b2/525d5c4e9b6e3fc2118512129a3b92f4cbc6296d64668155776b3368e4b8/datecond-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "281fd9ee3ee33e5b846bea8f9a29f033", "sha256": "c55a58634d0962c015fa9c566c62635b56a34589d1914c55c13aed94eed141cd" }, "downloads": -1, "filename": "datecond-0.1.6-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "281fd9ee3ee33e5b846bea8f9a29f033", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9897, "upload_time": "2017-03-07T15:59:03", "url": "https://files.pythonhosted.org/packages/51/c3/7692595bca00b32eb959495d88dfdbb3e606b5763eb851c6d7dc1257bb16/datecond-0.1.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5b60bd52e0a53f42d5211398702b4ee4", "sha256": "d24d35242a6e84ddbfb1a1de9aa52babe97cc0fa3a7cc1a3b772f8249fbfdf25" }, "downloads": -1, "filename": "datecond-0.1.6.tar.gz", "has_sig": true, "md5_digest": "5b60bd52e0a53f42d5211398702b4ee4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10491, "upload_time": "2017-03-07T15:59:09", "url": "https://files.pythonhosted.org/packages/70/e4/43a292a03cfad762de4707763bc807e5a1fc92a920afa0824cb2f6f1e75f/datecond-0.1.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "281fd9ee3ee33e5b846bea8f9a29f033", "sha256": "c55a58634d0962c015fa9c566c62635b56a34589d1914c55c13aed94eed141cd" }, "downloads": -1, "filename": "datecond-0.1.6-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "281fd9ee3ee33e5b846bea8f9a29f033", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9897, "upload_time": "2017-03-07T15:59:03", "url": "https://files.pythonhosted.org/packages/51/c3/7692595bca00b32eb959495d88dfdbb3e606b5763eb851c6d7dc1257bb16/datecond-0.1.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5b60bd52e0a53f42d5211398702b4ee4", "sha256": "d24d35242a6e84ddbfb1a1de9aa52babe97cc0fa3a7cc1a3b772f8249fbfdf25" }, "downloads": -1, "filename": "datecond-0.1.6.tar.gz", "has_sig": true, "md5_digest": "5b60bd52e0a53f42d5211398702b4ee4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10491, "upload_time": "2017-03-07T15:59:09", "url": "https://files.pythonhosted.org/packages/70/e4/43a292a03cfad762de4707763bc807e5a1fc92a920afa0824cb2f6f1e75f/datecond-0.1.6.tar.gz" } ] }