{ "info": { "author": "Adam J. Stewart", "author_email": "ajstewart426@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Financial and Insurance Industry", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Topic :: Office/Business :: Financial :: Accounting", "Topic :: Office/Business :: Scheduling" ], "description": ".. image:: https://github.com/adamjstewart/fiscalyear/actions/workflows/style.yaml/badge.svg\n :target: https://github.com/adamjstewart/fiscalyear/actions/workflows/style.yaml\n\n.. image:: https://github.com/adamjstewart/fiscalyear/actions/workflows/tests.yaml/badge.svg\n :target: https://github.com/adamjstewart/fiscalyear/actions/workflows/tests.yaml\n\n.. image:: https://codecov.io/gh/adamjstewart/fiscalyear/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/adamjstewart/fiscalyear\n\n.. image:: https://readthedocs.org/projects/fiscalyear/badge/?version=latest\n :target: https://fiscalyear.readthedocs.io\n\n.. image:: https://badge.fury.io/py/fiscalyear.svg\n :target: https://pypi.org/project/fiscalyear/\n\n.. image:: https://anaconda.org/conda-forge/fiscalyear/badges/version.svg\n :target: https://anaconda.org/conda-forge/fiscalyear\n\n.. image:: https://img.shields.io/spack/v/py-torchgeo\n :target: https://spack.readthedocs.io/en/latest/package_list.html#py-torchgeo\n\nOverview\n========\n\n`fiscalyear `_ is a small, lightweight Python module providing helpful utilities for managing the fiscal calendar. It is designed as an extension of the built-in `datetime `_ and `calendar `_ modules, adding the ability to query the fiscal year, fiscal quarter, fiscal month, and fiscal day of a date or datetime object.\n\n\nBasic Usage\n===========\n\n``fiscalyear`` provides several useful classes.\n\n\nFiscalYear\n----------\n\nThe ``FiscalYear`` class provides an object for storing information about the start and end of a particular fiscal year.\n\n.. code-block:: python\n\n >>> from fiscalyear import *\n >>> a = FiscalYear(2017)\n >>> a.start\n FiscalDateTime(2016, 10, 1, 0, 0)\n >>> a.end\n FiscalDateTime(2017, 9, 30, 23, 59, 59)\n >>> a.isleap\n False\n\nYou can also get the current ``FiscalYear`` with:\n\n.. code-block:: python\n\n >>> FiscalYear.current()\n FiscalYear(2018)\n\n\nFiscalQuarter\n-------------\n\nThe ``FiscalYear`` class also allows you to query information about a specific fiscal quarter.\n\n.. code-block:: python\n\n >>> a.q3.start\n FiscalDateTime(2017, 4, 1, 0, 0)\n >>> a.q3.end\n FiscalDateTime(2017, 6, 30, 23, 59, 59)\n\n\nThese objects represent the standalone ``FiscalQuarter`` class.\n\n.. code-block:: python\n\n >>> b = FiscalQuarter(2017, 3)\n >>> b.start\n FiscalDateTime(2017, 4, 1, 0, 0)\n >>> b.end\n FiscalDateTime(2017, 6, 30, 23, 59, 59)\n >>> a.q3 == b\n True\n >>> b in a\n True\n >>> b.next_fiscal_quarter\n FiscalQuarter(2017, 4)\n\nYou can also get the current ``FiscalQuarter`` with:\n\n.. code-block:: python\n\n >>> FiscalQuarter.current()\n FiscalQuarter(2018, 2)\n\n\nFiscalMonth\n-----------\n\nThe ``FiscalMonth`` class allows you to keep track of the fiscal month.\n\n.. code-block:: python\n\n >>> c = FiscalMonth(2017, 9)\n >>> c.start\n FiscalDateTime(2017, 6, 1, 0, 0)\n >>> c.end\n FiscalDateTime(2017, 6, 30, 23, 59, 59)\n >>> c in a\n True\n >>> c in b\n True\n >>> c.next_fiscal_month\n FiscalMonth(2017, 10)\n\nYou can also get the current ``FiscalMonth`` with:\n\n.. code-block:: python\n\n >>> FiscalMonth.current()\n FiscalMonth(2018, 4)\n\n\nFiscalDay\n---------\n\nTo keep track of the fiscal day, use the ``FiscalDay`` class.\n\n.. code-block:: python\n\n >>> d = FiscalDay(2017, 250)\n >>> d.start\n FiscalDateTime(2017, 6, 6, 0, 0)\n >>> d.end\n FiscalDateTime(2017, 6, 6, 23, 59, 59)\n >>> d in a\n True\n >>> d in b\n True\n >>> d in c\n True\n >>> d.next_fiscal_day\n FiscalDay(2017, 251)\n\nYou can also get the current ``FiscalDay`` with:\n\n.. code-block:: python\n\n >>> FiscalDay.current()\n FiscalDay(2018, 94)\n\n\nFiscalDateTime\n--------------\n\nThe start and end of each of the above objects are stored as instances of the ``FiscalDateTime`` class. This class provides all of the same features as the ``datetime`` class, with the addition of the ability to query the fiscal year, fiscal quarter, fiscal month, and fiscal day.\n\n.. code-block:: python\n\n >>> e = FiscalDateTime.now()\n >>> e\n FiscalDateTime(2017, 4, 8, 20, 30, 31, 105323)\n >>> e.fiscal_year\n 2017\n >>> e.fiscal_quarter\n 3\n >>> e.next_fiscal_quarter\n FiscalQuarter(2017, 4)\n >>> e.fiscal_month\n 7\n >>> e.fiscal_day\n 190\n\n\nFiscalDate\n----------\n\nIf you don't care about the time component of the ``FiscalDateTime`` class, the ``FiscalDate`` class is right for you.\n\n.. code-block:: python\n\n >>> f = FiscalDate.today()\n >>> f\n FiscalDate(2017, 4, 8)\n >>> f.fiscal_year\n 2017\n >>> f.prev_fiscal_year\n FiscalYear(2016)\n\n\nInstallation\n============\n\n``fiscalyear`` has no dependencies, making it simple and easy to install. The recommended way to install ``fiscalyear`` is with ``pip``.\n\n.. code-block:: console\n\n $ pip install fiscalyear\n\n\nFor alternate installation methods, see the `Installation Documentation `_.\n\n\nDocumentation\n=============\n\nDocumentation is hosted on `Read the Docs `_.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/adamjstewart/fiscalyear", "keywords": "fiscal year,fiscal quarter,calendar,datetime", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "fiscalyear", "package_url": "https://pypi.org/project/fiscalyear/", "platform": "", "project_url": "https://pypi.org/project/fiscalyear/", "project_urls": { "Homepage": "https://github.com/adamjstewart/fiscalyear" }, "release_url": "https://pypi.org/project/fiscalyear/0.4.0/", "requires_dist": null, "requires_python": ">=3.6", "summary": "Utilities for managing the fiscal calendar", "version": "0.4.0", "yanked": false, "yanked_reason": null }, "last_serial": 12916518, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "30e36b259f3e72e4929abbf259335742", "sha256": "3fde4a12eeb72da446beb487e078adf1223a92d130520e589b82d7d1509701a2" }, "downloads": -1, "filename": "fiscalyear-0.1.0.tar.gz", "has_sig": false, "md5_digest": "30e36b259f3e72e4929abbf259335742", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5808, "upload_time": "2017-04-17T02:50:42", "upload_time_iso_8601": "2017-04-17T02:50:42.227654Z", "url": "https://files.pythonhosted.org/packages/1c/ad/1a278fd76462483cb22eee2eea4411ed44117a9cff3a0fcb5f0d8b82fcf5/fiscalyear-0.1.0.tar.gz", "yanked": false, "yanked_reason": null } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "ef16ad4b13f24f10fb56328e227f367f", "sha256": "f513616aeb03046406c56d7c69cd9e26f6a12963c71c1410cc3d4532a5bfee71" }, "downloads": -1, "filename": "fiscalyear-0.2.0.tar.gz", "has_sig": false, "md5_digest": "ef16ad4b13f24f10fb56328e227f367f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6965, "upload_time": "2019-10-26T03:09:21", "upload_time_iso_8601": "2019-10-26T03:09:21.374705Z", "url": "https://files.pythonhosted.org/packages/97/d2/8e67500043411e498f55e5c8a962f68dfda6a54c3098ff98154e111c8ac3/fiscalyear-0.2.0.tar.gz", "yanked": false, "yanked_reason": null } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "c335b9a40584ee6d202819cfa06b5a72", "sha256": "1904d00c8b91f05825918014366df2880e86c0824c5ea36c30b9761c66662abc" }, "downloads": -1, "filename": "fiscalyear-0.3.0-py2-none-any.whl", "has_sig": false, "md5_digest": "c335b9a40584ee6d202819cfa06b5a72", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 8761, "upload_time": "2021-01-14T23:28:14", "upload_time_iso_8601": "2021-01-14T23:28:14.162277Z", "url": "https://files.pythonhosted.org/packages/d9/60/914e5ebb95b014b0e7bc61842da4a53477ed54dec56fb70cc1ef1ff49cab/fiscalyear-0.3.0-py2-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "42a10dd1a3927f29c84175bb6af56c50", "sha256": "56a57782d704915b59f3c5e9e8411a0326d1f7c480565eaa7173459d3721001a" }, "downloads": -1, "filename": "fiscalyear-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "42a10dd1a3927f29c84175bb6af56c50", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8761, "upload_time": "2021-01-14T23:23:01", "upload_time_iso_8601": "2021-01-14T23:23:01.127432Z", "url": "https://files.pythonhosted.org/packages/2f/f1/564cccf16d205f3b8694b321ee571c0cf51802f2407cb1997f9c093b8320/fiscalyear-0.3.0-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "a4ce5bb7b210cb28c8c49d0c73ad1b16", "sha256": "64f97b3a0ab6b2857d09f0016bd3aae37646a454a5c2c66e907fef03ae54a816" }, "downloads": -1, "filename": "fiscalyear-0.3.0.tar.gz", "has_sig": false, "md5_digest": "a4ce5bb7b210cb28c8c49d0c73ad1b16", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9654, "upload_time": "2021-01-14T23:23:03", "upload_time_iso_8601": "2021-01-14T23:23:03.115440Z", "url": "https://files.pythonhosted.org/packages/15/64/8cc7d15018eb41e04af990487d2a8557a36fb158d4a66f7119ebd5b447f3/fiscalyear-0.3.0.tar.gz", "yanked": false, "yanked_reason": null } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "4e1cafabbace919977dcb105e92c9523", "sha256": "50a91aa74a6db7dfd67c18b5329a7ca1b38d6a75f64889d8eb1d8d73e4d9422e" }, "downloads": -1, "filename": "fiscalyear-0.3.1-py2-none-any.whl", "has_sig": false, "md5_digest": "4e1cafabbace919977dcb105e92c9523", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 8716, "upload_time": "2021-02-07T16:44:24", "upload_time_iso_8601": "2021-02-07T16:44:24.167947Z", "url": "https://files.pythonhosted.org/packages/0c/0d/ea49acc2c45824a14f439fa30b78c9c339134f6fb3143a491e8d7c090b7f/fiscalyear-0.3.1-py2-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "af0567cc699830e4611fc8caf5bc22d3", "sha256": "0aa217e44fe08d8299be550dc5917ddba35fb55ecdccb6c40add63bb3d33b4d9" }, "downloads": -1, "filename": "fiscalyear-0.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "af0567cc699830e4611fc8caf5bc22d3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8715, "upload_time": "2021-02-07T16:44:25", "upload_time_iso_8601": "2021-02-07T16:44:25.449289Z", "url": "https://files.pythonhosted.org/packages/85/2d/eed35fa897d8ee765dad954ca2c9a5c105482b6196bbb6c8572096a67805/fiscalyear-0.3.1-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "aa7c99f5d9984fc2568ae0cacc54accb", "sha256": "5964b4be71453c1fa5da804343cea866e0299aff874aa59ae186a8a9b9ff62d0" }, "downloads": -1, "filename": "fiscalyear-0.3.1.tar.gz", "has_sig": false, "md5_digest": "aa7c99f5d9984fc2568ae0cacc54accb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21661, "upload_time": "2021-02-07T16:44:28", "upload_time_iso_8601": "2021-02-07T16:44:28.140269Z", "url": "https://files.pythonhosted.org/packages/d1/86/212262079a2ef8df749e669e37e8d653edcf3da98ee1a7cdfa78e38de80c/fiscalyear-0.3.1.tar.gz", "yanked": false, "yanked_reason": null } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "65f976a2506a39027d8062b47a4374d5", "sha256": "79f0cdc1fa8334397863b12c915951e6279261c27db2948168d36b375a32ec1b" }, "downloads": -1, "filename": "fiscalyear-0.3.2-py2-none-any.whl", "has_sig": false, "md5_digest": "65f976a2506a39027d8062b47a4374d5", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 8728, "upload_time": "2021-06-11T01:51:07", "upload_time_iso_8601": "2021-06-11T01:51:07.155310Z", "url": "https://files.pythonhosted.org/packages/0a/d9/64149117d26f000ef1b4e32e6e5a3fb84426057cab003d30b944b16bea0e/fiscalyear-0.3.2-py2-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "05eb4795b61941358333ca69a63aae62", "sha256": "183ca2f590d6e4fc27780c7078fb825235cb6dbd3dd2857b3a4828b3ef21c5bd" }, "downloads": -1, "filename": "fiscalyear-0.3.2-py3-none-any.whl", "has_sig": false, "md5_digest": "05eb4795b61941358333ca69a63aae62", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8728, "upload_time": "2021-06-11T01:51:08", "upload_time_iso_8601": "2021-06-11T01:51:08.628294Z", "url": "https://files.pythonhosted.org/packages/51/f2/c3185bf5089738c75fc5964b7fb3aaaeeb4c636c7e95d55de7ad50b2324d/fiscalyear-0.3.2-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "18c80fc7a7bef223cb0cac35e5967008", "sha256": "0697b2af4ab2d4c6188fac33d340f31dea9b0e1f0d3666d6752faeedd744f019" }, "downloads": -1, "filename": "fiscalyear-0.3.2.tar.gz", "has_sig": false, "md5_digest": "18c80fc7a7bef223cb0cac35e5967008", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21673, "upload_time": "2021-06-11T01:51:10", "upload_time_iso_8601": "2021-06-11T01:51:10.141934Z", "url": "https://files.pythonhosted.org/packages/cb/a1/1c285645ac8348ddeff6c4cf0df254c12489c0caf211d86fd2db362483c3/fiscalyear-0.3.2.tar.gz", "yanked": false, "yanked_reason": null } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "c4676ccd725852f2cfe0d56ffecc0450", "sha256": "8adb8022a76cc52974d059d176ec3f33b2d7a6c1f72ac356702bc70e1e5e4d92" }, "downloads": -1, "filename": "fiscalyear-0.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "c4676ccd725852f2cfe0d56ffecc0450", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 8417, "upload_time": "2022-02-17T03:18:26", "upload_time_iso_8601": "2022-02-17T03:18:26.523333Z", "url": "https://files.pythonhosted.org/packages/41/ea/6e5568ef338ba918be8c8fccc0a717d824c13187fe5cb9e8ad8530d113d1/fiscalyear-0.4.0-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "0b1b11729ed663ca59917307ebc3efbf", "sha256": "12857a48bd7b97bda78d833b29e81f30ec5aa018241f690e714b472b25fa1b47" }, "downloads": -1, "filename": "fiscalyear-0.4.0.tar.gz", "has_sig": false, "md5_digest": "0b1b11729ed663ca59917307ebc3efbf", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8836, "upload_time": "2022-02-17T03:18:28", "upload_time_iso_8601": "2022-02-17T03:18:28.541138Z", "url": "https://files.pythonhosted.org/packages/58/d0/03cabc6369fe1f0dcb73339ec1bf11ddb62d25ba03f531deacfd1078655a/fiscalyear-0.4.0.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c4676ccd725852f2cfe0d56ffecc0450", "sha256": "8adb8022a76cc52974d059d176ec3f33b2d7a6c1f72ac356702bc70e1e5e4d92" }, "downloads": -1, "filename": "fiscalyear-0.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "c4676ccd725852f2cfe0d56ffecc0450", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 8417, "upload_time": "2022-02-17T03:18:26", "upload_time_iso_8601": "2022-02-17T03:18:26.523333Z", "url": "https://files.pythonhosted.org/packages/41/ea/6e5568ef338ba918be8c8fccc0a717d824c13187fe5cb9e8ad8530d113d1/fiscalyear-0.4.0-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "0b1b11729ed663ca59917307ebc3efbf", "sha256": "12857a48bd7b97bda78d833b29e81f30ec5aa018241f690e714b472b25fa1b47" }, "downloads": -1, "filename": "fiscalyear-0.4.0.tar.gz", "has_sig": false, "md5_digest": "0b1b11729ed663ca59917307ebc3efbf", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8836, "upload_time": "2022-02-17T03:18:28", "upload_time_iso_8601": "2022-02-17T03:18:28.541138Z", "url": "https://files.pythonhosted.org/packages/58/d0/03cabc6369fe1f0dcb73339ec1bf11ddb62d25ba03f531deacfd1078655a/fiscalyear-0.4.0.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }