{ "info": { "author": "Wilson Freitas", "author_email": "wilson.freitas@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Utilities" ], "description": "**That version has been completely rewritten and many functions have been redesigned and became slightly different from the earlier version.**\r\n\r\nIn several countries and markets, to account the value of financial instruments, mainly bonds and derivatives, it is\r\nnecessary the use of different rules to compute the way the days go by. Those rules are related to holidays which are\r\nintrinsically related to counties and local markets. Usually you have a list with the holidays and all you want is to\r\nfind out the number of business days between two dates, nothing more. It is necessary for pricing properly the\r\nfinancial instrument. bizdays was implemented to do that, compute business days between two dates and other collateral\r\neffects like adjust a given date for the next or previous business day, and so forth. bizdays is a module without\r\ndependencies, what makes it appropriate for simple implementations.\r\n\r\nbizdays is a small set of functions to help with calculations which make use of business days. It works based on a list\r\nof holidays which is passed as an argument. Its interface is simple and flexible operating on vector of dates. bizdays\r\ncan be fairly used for fixed income calculations. Many countries make intense use of business days to price financial\r\ninstruments, like bonds and derivatives.\r\n\r\nExamples::\r\n\r\n >>> from bizdays import Calendar, load_holidays\r\n >>> holidays = load_holidays('Brazil.txt') # Brazilian financial market holidays \r\n >>> cal = Calendar(holidays, ['Sunday', 'Saturday'], name='Brazil')\r\n >>> cal\r\n Calendar: Brazil\r\n Start: 2000-01-01\r\n End: 2078-12-25\r\n Holidays: 948\r\n \r\n >>> cal.isbizday('2014-01-12')\r\n False\r\n \r\n >>> cal.isbizday('2014-01-13')\r\n True\r\n \r\n >>> cal.bizdays('2014-01-13', '2015-01-13')\r\n 253\r\n \r\n >>> cal.adjust_next('2015-12-25')\r\n datetime.date(2015, 12, 28)\r\n \r\n >>> cal.adjust_next('2015-12-28')\r\n datetime.date(2015, 12, 28)\r\n \r\n >>> cal.adjust_previous('2014-01-01')\r\n datetime.date(2013, 12, 31)\r\n \r\n >>> cal.adjust_previous('2014-01-02')\r\n datetime.date(2014, 1, 2)\r\n \r\n >>> cal.seq('2014-01-02', '2014-01-07')\r\n \r\n \r\n >>> list(cal.seq('2014-01-02', '2014-01-07'))\r\n [datetime.date(2014, 1, 2),\r\n datetime.date(2014, 1, 3),\r\n datetime.date(2014, 1, 6),\r\n datetime.date(2014, 1, 7)]\r\n \r\n >>> cal.offset('2014-01-02', 5)\r\n datetime.date(2014, 1, 9)\r\n \r\n >>> cal.getdate('15th day', 2002, 5)\r\n datetime.date(2002, 5, 15)\r\n \r\n >>> cal.getdate('15th bizday', 2002, 5)\r\n datetime.date(2002, 5, 22)\r\n \r\n >>> cal.getdate('last wed', 2002, 5)\r\n datetime.date(2002, 5, 29)\r\n \r\n >>> cal.getdate('first fri before last day ', 2002, 5)\r\n datetime.date(2002, 5, 24)", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://aboutwilson.net/python-bizdays/", "keywords": "business days,finance,calendar,bizdays", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "bizdays", "package_url": "https://pypi.org/project/bizdays/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/bizdays/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://aboutwilson.net/python-bizdays/" }, "release_url": "https://pypi.org/project/bizdays/v0.2.0/", "requires_dist": null, "requires_python": null, "summary": "Functions to handle business days calculations", "version": "v0.2.0" }, "last_serial": 1516087, "releases": { "v0.2.0": [ { "comment_text": "", "digests": { "md5": "5686219a9d2a4d7db1cbc80a8d35607f", "sha256": "34213953d19ed32bd4344150bcfb05b5b5d5a5f35719894159cb05aae01a0b6d" }, "downloads": -1, "filename": "bizdays-v0.2.0.tar.gz", "has_sig": false, "md5_digest": "5686219a9d2a4d7db1cbc80a8d35607f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7138, "upload_time": "2014-10-19T03:02:09", "url": "https://files.pythonhosted.org/packages/ee/07/f2014d2753fefe6d0f0523210e24c7b97f089eab70427229f8104fdbe5cd/bizdays-v0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5686219a9d2a4d7db1cbc80a8d35607f", "sha256": "34213953d19ed32bd4344150bcfb05b5b5d5a5f35719894159cb05aae01a0b6d" }, "downloads": -1, "filename": "bizdays-v0.2.0.tar.gz", "has_sig": false, "md5_digest": "5686219a9d2a4d7db1cbc80a8d35607f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7138, "upload_time": "2014-10-19T03:02:09", "url": "https://files.pythonhosted.org/packages/ee/07/f2014d2753fefe6d0f0523210e24c7b97f089eab70427229f8104fdbe5cd/bizdays-v0.2.0.tar.gz" } ] }