{ "info": { "author": "BlueDynamics Alliance", "author_email": "dev@bluedynamics.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Utilities" ], "description": "bda.intellidatetime\n===================\n\nOverview\n--------\n\n``bda.intellidatetime`` provides a converter for date and time input to python\n``datetime.datetime`` objects.\n\nThe input format is definded by a locale2pattern mapping and is provided by\na seperate interface.\n\nCurrently provided locales are:\n \n- en\n- de\n- fr\n- es\n- uk\n- it\n- cs\n- and the special locale ``iso``, which is used as default.\n\n\nExample\n-------\n\nUse the convert function:\n\n.. code-block:: pycon\n\n >>> from bda.intellidatetime import convert\n >>> convert('1.1.08', locale='de')\n datetime.datetime(2008, 1, 1, 0, 0)\n\n\nAPI\n---\n\nThe signature of ``bda.intellidatetime.convert`` looks like so:\n\n.. code-block:: python\n\n def convert(date, time=None, tzinfo=None, locale='iso'):\n \"\"\"Convert the input to a datetime object.\n\n The convert function accepts unicode or non-unicode strings and tries\n to parse out Date and Time information as follows:\n * First try to get the localized datetime pattern information\n * If no one is found, a default pattern is used.\n * Parse the input by the definitions of the localized datetime pattern\n * Create a datetime object and return it\n\n The 'intelligence' is defined by following behaviour:\n\n Date:\n * If only one value is found f.e. '1', this value is handled as the\n day value, for month and for year the current ones are used.\n * Respective, if two values are given, they are handled as day and\n month, year is auto completed with the current year.\n * 3 values are a complete date information, if year is a 2-character\n string, it is handled as year in the current century\n * as limiters are all non-numeric values accepted\n * date input can be done without limiters, therefor all characters\n must be numbers, and the string length must be either 2, 4, 6 or 8\n characters. 2 characters define the day, 4 characters the day and\n the month, 6 characters day, month and the year of the current\n century and 8 characters define a complete date.\n\n Time:\n * If time is None, time is set to 00:00\n * if time is a 2-character string, it is handled as the hour, minutes\n are defined as 00\n * time input can be done without a limiter, therefor time must be an\n all numeric 4-character string, the first 2 chars are handled as\n hour, the second 2 chars as minute.\n * as limiter are all non-numeric values accepted\n * seconds are never computed and are therefor ALWAYS handled as '00'\n\n Limiters can be any 1 or more character non numeric values. An input\n can look like `` %_2008 1 abcde 5 ---`` and is still valid and with\n default locale converted to ``datetime.datetime(2008, 1, 5, 0, 0)``.\n\n If parsing of the input values is not possible or converting the parsed\n values to numeric values is not possible or the valid date and time\n range falls out of scope, a ``DateTimeConversionError`` is raised.\n\n @param date - a date as string\n @param time - a time as string\n @param tzinfo - a tzinfo object to be considered, defaults to None. If\n given the date and time taken as in the given timezone.\n If the timezone is DST-aware time will be normalized\n for DST/non-DST.\n @param locale - a locale name, which is used to determine the date and\n time patterns. There exists a special locale named\n 'iso', which is default and expects the input in ISO\n format.\n @return datetime - datetime.datetime object\n @raise DateTimeConversionError - if conversion fails\n \"\"\"\n\n\nLicence\n-------\n\n- Simplified BSD\n\n\nContributors\n============\n\n- Robert Niederreiter (Author)\n- Jens W. Klein\n\n\nChanges\n=======\n\n1.3 (2018-07-16)\n----------------\n\n- Python 3 compatibility.\n [rnix]\n\n- Convert doctests to unittests.\n [rnix]\n\n\n1.2.2\n-----\n\n- Package cleanup.\n [rnix, 2017-03-29]\n\n\n1.2.1\n-----\n\n- fix ``MANIFEST.in`` to include ``configure.zcml`` in release\n [jensens, 2013-09-23]\n\n\n1.2\n---\n\n- Use ``zope.interface.implementer`` instead of ``zope.interface.implements``.\n [rnix, 2012-05-18]\n\n\n1.1\n---\n\n- Provide convenience ``convert`` function.\n [rnix, 2010-05-08]\n\n- Change package structure.\n [rnix, 2010-05-08]\n\n- Move tests into seperate file.\n [rnix, 2010-05-08]\n\n- Change signature of converter. could now be registered as utility as well if\n desired.\n [rnix, 2010-05-08]\n\n- Adapter pattern deprecated.\n [rnix, 2010-05-08]\n\n\n1.0\n---\n\n- Make it work\n [rnix, jensens]\n\nLicense\n=======\n\nCopyright (c) 2010-2018, BlueDynamics Alliance, Austria\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this \n list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above copyright notice, this \n list of conditions and the following disclaimer in the documentation and/or \n other materials provided with the distribution.\n* Neither the name of the BlueDynamics Alliance nor the names of its \n contributors may be used to endorse or promote products derived from this \n software without specific prior written permission.\n \nTHIS SOFTWARE IS PROVIDED BY BlueDynamics Alliance ``AS IS`` AND ANY\nEXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL BlueDynamics Alliance BE LIABLE FOR ANY\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/bluedynamics/bda.intellidatetime", "keywords": "", "license": "Simplified BSD", "maintainer": "", "maintainer_email": "", "name": "bda.intellidatetime", "package_url": "https://pypi.org/project/bda.intellidatetime/", "platform": "", "project_url": "https://pypi.org/project/bda.intellidatetime/", "project_urls": { "Homepage": "https://github.com/bluedynamics/bda.intellidatetime" }, "release_url": "https://pypi.org/project/bda.intellidatetime/1.3/", "requires_dist": null, "requires_python": "", "summary": "bda.intellidatetime", "version": "1.3" }, "last_serial": 4065734, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "65e80c9d10abd5df4c565d785257d1a6", "sha256": "df26aa64a4234c05a8e97bae5034a746fe04e8d54f375b1cfcd6e58f6ae65852" }, "downloads": -1, "filename": "bda.intellidatetime-1.0.tar.gz", "has_sig": false, "md5_digest": "65e80c9d10abd5df4c565d785257d1a6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7265, "upload_time": "2009-03-05T13:08:34", "url": "https://files.pythonhosted.org/packages/15/ae/2b843b51fd0c0a151e6f26d832b53ae12f0f282fcbd65c7cc796f26f6cd7/bda.intellidatetime-1.0.tar.gz" } ], "1.0-beta1": [ { "comment_text": "", "digests": { "md5": "d10d2011b7f2cd40a15727b23324a7a7", "sha256": "9464ea7a3a0d4d2a3ce2f1afd16679daf58681bcf43dec604e5b74c8bfdcb653" }, "downloads": -1, "filename": "bda.intellidatetime-1.0-beta1.tar.gz", "has_sig": false, "md5_digest": "d10d2011b7f2cd40a15727b23324a7a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6697, "upload_time": "2008-02-08T13:33:54", "url": "https://files.pythonhosted.org/packages/02/cf/6316bfc2568268362b80f2e8564ad41464b42cfc49e8df69ac20457ffb3f/bda.intellidatetime-1.0-beta1.tar.gz" } ], "1.0-beta2": [ { "comment_text": "", "digests": { "md5": "ee81b1a80914346ced9fb4b87dc034f3", "sha256": "3607ef0f05ed754b2cd256d39b589e8cca5c5a69395b0ce549c990daa018dcd5" }, "downloads": -1, "filename": "bda.intellidatetime-1.0-beta2.tar.gz", "has_sig": false, "md5_digest": "ee81b1a80914346ced9fb4b87dc034f3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6712, "upload_time": "2008-02-14T07:05:51", "url": "https://files.pythonhosted.org/packages/69/0c/e44d212e41a3c187589e0a5742dda9d3843b93a93bb1c8405d62feb5309d/bda.intellidatetime-1.0-beta2.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "d0575ef230fea4f09a218016f0973d3e", "sha256": "85b407d7922ddcf9f7bf404dd4a752fcba8698631aed6574c12bf4ea6a9aba8a" }, "downloads": -1, "filename": "bda.intellidatetime-1.1.tar.gz", "has_sig": false, "md5_digest": "d0575ef230fea4f09a218016f0973d3e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7900, "upload_time": "2010-11-25T18:15:50", "url": "https://files.pythonhosted.org/packages/a7/d4/0d8914b856f3e77be9aa971318269063de1b14f4f4a2f7087d656f733a19/bda.intellidatetime-1.1.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "05d03bb9833028dca46c791ee1cd913b", "sha256": "cc17bf72b4884283a2b0e0dc6fe229b1e9da6a52caa7fd14d5226c5d0244fdb0" }, "downloads": -1, "filename": "bda.intellidatetime-1.2.tar.gz", "has_sig": false, "md5_digest": "05d03bb9833028dca46c791ee1cd913b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7001, "upload_time": "2012-07-18T23:02:17", "url": "https://files.pythonhosted.org/packages/b4/39/569668a1452f999a45103438964d29b74e7531e071148fcbc5ccc5ec7e14/bda.intellidatetime-1.2.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "c21f0c1f5e9f71240734e5c05d988aae", "sha256": "6c28f2a8f97cda1c22566c62591ce3d447916225851128198534e60dec4b7573" }, "downloads": -1, "filename": "bda.intellidatetime-1.2.1.tar.gz", "has_sig": false, "md5_digest": "c21f0c1f5e9f71240734e5c05d988aae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10026, "upload_time": "2013-09-23T12:34:08", "url": "https://files.pythonhosted.org/packages/14/48/d2db6d6e568cc6897647adbc358ac09e7445412644ff62cb892f40144785/bda.intellidatetime-1.2.1.tar.gz" } ], "1.2.2": [ { "comment_text": "", "digests": { "md5": "0902dd6faf9fe96ae9e5d3d9fbe332d1", "sha256": "88bacec06e2edbbaabe358f0536e446341f97e12f9dc2e168f329c635ea5e828" }, "downloads": -1, "filename": "bda.intellidatetime-1.2.2.tar.gz", "has_sig": false, "md5_digest": "0902dd6faf9fe96ae9e5d3d9fbe332d1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8591, "upload_time": "2017-03-29T08:58:03", "url": "https://files.pythonhosted.org/packages/70/d4/73b7377dcdff4040f297f7d01fa19fb4d5e701c971ead4d78e15d94026b0/bda.intellidatetime-1.2.2.tar.gz" } ], "1.3": [ { "comment_text": "", "digests": { "md5": "03b883ad014b21a0b28505f2cac7cce2", "sha256": "5db6aca53bf2fd3f2d6e83c1fbda0cc777dd8dc846edca444da10ffcb0dc5533" }, "downloads": -1, "filename": "bda.intellidatetime-1.3.tar.gz", "has_sig": false, "md5_digest": "03b883ad014b21a0b28505f2cac7cce2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9897, "upload_time": "2018-07-16T13:25:16", "url": "https://files.pythonhosted.org/packages/3e/40/c5d78c07f5841f1b1aef7b976520c356b9e53cc85b86c5fa7610fd9fa956/bda.intellidatetime-1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "03b883ad014b21a0b28505f2cac7cce2", "sha256": "5db6aca53bf2fd3f2d6e83c1fbda0cc777dd8dc846edca444da10ffcb0dc5533" }, "downloads": -1, "filename": "bda.intellidatetime-1.3.tar.gz", "has_sig": false, "md5_digest": "03b883ad014b21a0b28505f2cac7cce2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9897, "upload_time": "2018-07-16T13:25:16", "url": "https://files.pythonhosted.org/packages/3e/40/c5d78c07f5841f1b1aef7b976520c356b9e53cc85b86c5fa7610fd9fa956/bda.intellidatetime-1.3.tar.gz" } ] }