{ "info": { "author": "eleddy", "author_email": "elizabeth.leddy@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Framework :: Plone", "Intended Audience :: Developers", "Programming Language :: Python" ], "description": "Introduction\n============\n\nThis is a Date Index. If you care about time, then turn around. If you care about \ntimezones, turn around. If however you only wish for the utter humiliating \ndestruction of timezones, then you have come to the right place.\n\nMotivation\n----------\nThe best way to describe this is to think about the use case(cover your eyes if you \ndon't like dirty words): reports.\n\nThe core case for this is events/meetings/appointments/etc. Sure you care about \ntime if you are displaying details but when reporting its about as useful as a monkey \non a pogo stick. Here you want to do queries such as \"show me how many appointments I \nhad on May 08 2011.\" The query for that with the current DateTime catalog looks \nsomething like:: \n\n ...\n {'query':DateTime('2011-05-08',\n DateTime('2011-05-08')+.999999999),\n 'range': 'min:max'}},\n ...\n \nWithout the .99999 a bunch of stuff gets filtered. Oh, and if your portal is in a \ndifferent timezone than the server running it, forget about getting anything consistent.\n\nFurthermore, we can send in just about any data you want and convert it. You like strings?\nWe got strings. You like datetime? We got datetime. Oh, and it takes care of that pesky \n\"/\" vs \"-\" thing as well when parsing strings.\n\nOf course, with careful code planning an monitoring we can avoid all this but who has \ntime for that. Enter DateDateIndex. DateDateIndex is the counter to DateTimeIndex, which \ncoincidentally was renamed to DateIndex, although it is actually a DateTime Index. \n\nThe Details\n-----------\nThis index will take a date, time, datetime, DateTime, or string. It will discard \nany time and timezone information faster than you can say uncle. Then it will turn \nit into a time neutral DateTime object and store like any other. The difference \nbeing that you can query and not have to worry about timezones, since it will always \nbe native to the local server.\n\nTo use, simply add a new DateDateIndex from the ZMI like you would any other. When you \nquery, you can also query like you would, except its very flexible. The scenario above \nwould look more like::\n\n ...\n {'query':'2011-05-08',\n '2011-05-08'),\n 'range': 'min:max'}},\n ...\n \nIf you send in times for the query they will get stripped too. Query can also take any \nmeaningful data type like DateTime, datetime, etc...\n\nNote that the current version has only been tested on Plone 4.x. Who knows what lies in \nstore for the rest.\n \nThoughts\n--------\n - Has this been extensively tested? Nope. \n - Are there better ways to do this? Probably, but this seemed the fastest way at the moment. \n - What is the performance like? No idea. Although this inherits from DateIndex so all those \noptimizations will trickle down. \n - Is this a good solution for me? Probably not. This is currently being tested before hitting \n a live site and is without issues but tread carefully. It's not SO insance.\n - Only tested in Plone 4.0 and 4.1\n\nBugs/Questions/Whatever\n-----------------------\nhttps://github.com/eleddy/PluginIndexes.DateDateIndex\n\n\nChangelog\n=========\n\n.1 (2011-06-20)\n---------------\n- Initial release [eleddy]", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://svn.plone.org/svn/collective/", "keywords": "zcatalog,plone,catalog,index,date", "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "PluginIndexes.DateDateIndex", "package_url": "https://pypi.org/project/PluginIndexes.DateDateIndex/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/PluginIndexes.DateDateIndex/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://svn.plone.org/svn/collective/" }, "release_url": "https://pypi.org/project/PluginIndexes.DateDateIndex/.1/", "requires_dist": null, "requires_python": null, "summary": "Date Index for ZCatalog that ignores time[zones]", "version": ".1" }, "last_serial": 747830, "releases": { ".1": [ { "comment_text": "", "digests": { "md5": "3d2adcb8edd0beb674fc91d93557b521", "sha256": "89a1cf9936314094f32bc29bbb8625fe434ba3a4983eb80dec6037d85401bef0" }, "downloads": -1, "filename": "PluginIndexes.DateDateIndex-.1.tar.gz", "has_sig": false, "md5_digest": "3d2adcb8edd0beb674fc91d93557b521", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6969, "upload_time": "2011-06-21T06:05:56", "url": "https://files.pythonhosted.org/packages/8a/06/e9d864aa64fa18b8c6c48b5b00f84fe6564a33e5d3d3791482125d69268b/PluginIndexes.DateDateIndex-.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3d2adcb8edd0beb674fc91d93557b521", "sha256": "89a1cf9936314094f32bc29bbb8625fe434ba3a4983eb80dec6037d85401bef0" }, "downloads": -1, "filename": "PluginIndexes.DateDateIndex-.1.tar.gz", "has_sig": false, "md5_digest": "3d2adcb8edd0beb674fc91d93557b521", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6969, "upload_time": "2011-06-21T06:05:56", "url": "https://files.pythonhosted.org/packages/8a/06/e9d864aa64fa18b8c6c48b5b00f84fe6564a33e5d3d3791482125d69268b/PluginIndexes.DateDateIndex-.1.tar.gz" } ] }