days360


Namedays360 JSON
Version 1.0.2 PyPI version JSON
download
home_pagehttps://github.com/tfeldmann/days360
SummaryExcel's DAYS360() formula for python.
upload_time2023-07-14 13:38:50
maintainer
docs_urlNone
authorThomas Feldmann
requires_python>=3.8,<4.0
licenseMIT
keywords excel formula finance days360
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # days360

[![Tests](https://github.com/tfeldmann/days360/actions/workflows/tests.yml/badge.svg)](https://github.com/tfeldmann/days360/actions/workflows/tests.yml)
<a href="https://pypi.org/project/days360/">
  <img src="https://img.shields.io/pypi/v/days360" title="PyPI Version">
</a>

Calculates the days between two dates based on the 360-day year.

- Implementation of Excel's (or Number's) `DAYS360` / `TAGE360` formula in python.
- Both EU and US methods of calculation are supported, with optional Excel bug compatibility.

## Installation

```
pip install days360
```

## Usage

```python
from datetime import date
from days360 import days360

date_a = date(2022, 10, 2)
date_b = date(2023, 11, 30)

# supported methods: "US" (default), "US_NASD", "EU"
days = days360(date_a, date_b, method="US")
print(days)  # prints 418
```

## Planned

- ISDA, PSA and SIA methods
  - https://www.isda.org/2008/12/22/30-360-day-count-conventions/)
  - https://web.archive.org/web/20160425044113/http://www.nyift.com/lesson/day-count-convention-bonds/
  - https://github.com/miradulo/isda_daycounters

## Notes and credits

- Implementations are based on https://en.wikipedia.org/wiki/360-day_calendar.
- This library started as a port of this ruby gem: https://github.com/tamaloa/days360/tree/master

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/tfeldmann/days360",
    "name": "days360",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "excel,formula,finance,days360",
    "author": "Thomas Feldmann",
    "author_email": "mail@tfeldmann.de",
    "download_url": "https://files.pythonhosted.org/packages/97/ea/c9d4bdd10671f97d96c7e700635ac90899be410c454da39ecfbd3ce7e740/days360-1.0.2.tar.gz",
    "platform": null,
    "description": "# days360\n\n[![Tests](https://github.com/tfeldmann/days360/actions/workflows/tests.yml/badge.svg)](https://github.com/tfeldmann/days360/actions/workflows/tests.yml)\n<a href=\"https://pypi.org/project/days360/\">\n  <img src=\"https://img.shields.io/pypi/v/days360\" title=\"PyPI Version\">\n</a>\n\nCalculates the days between two dates based on the 360-day year.\n\n- Implementation of Excel's (or Number's) `DAYS360` / `TAGE360` formula in python.\n- Both EU and US methods of calculation are supported, with optional Excel bug compatibility.\n\n## Installation\n\n```\npip install days360\n```\n\n## Usage\n\n```python\nfrom datetime import date\nfrom days360 import days360\n\ndate_a = date(2022, 10, 2)\ndate_b = date(2023, 11, 30)\n\n# supported methods: \"US\" (default), \"US_NASD\", \"EU\"\ndays = days360(date_a, date_b, method=\"US\")\nprint(days)  # prints 418\n```\n\n## Planned\n\n- ISDA, PSA and SIA methods\n  - https://www.isda.org/2008/12/22/30-360-day-count-conventions/)\n  - https://web.archive.org/web/20160425044113/http://www.nyift.com/lesson/day-count-convention-bonds/\n  - https://github.com/miradulo/isda_daycounters\n\n## Notes and credits\n\n- Implementations are based on https://en.wikipedia.org/wiki/360-day_calendar.\n- This library started as a port of this ruby gem: https://github.com/tamaloa/days360/tree/master\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Excel's DAYS360() formula for python.",
    "version": "1.0.2",
    "project_urls": {
        "Homepage": "https://github.com/tfeldmann/days360",
        "Repository": "https://github.com/tfeldmann/days360"
    },
    "split_keywords": [
        "excel",
        "formula",
        "finance",
        "days360"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fe47ec18e652c92c06d518f75819e4e09f97b841d19d21879d709c49fa53946c",
                "md5": "bd038fc2a3875fd58b11b1277b52b36c",
                "sha256": "b3bdcce8f3ca2b046f5e63015a878bf56a560fe6fcaae657a399c3d6342232fc"
            },
            "downloads": -1,
            "filename": "days360-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bd038fc2a3875fd58b11b1277b52b36c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 4190,
            "upload_time": "2023-07-14T13:38:48",
            "upload_time_iso_8601": "2023-07-14T13:38:48.574009Z",
            "url": "https://files.pythonhosted.org/packages/fe/47/ec18e652c92c06d518f75819e4e09f97b841d19d21879d709c49fa53946c/days360-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "97eac9d4bdd10671f97d96c7e700635ac90899be410c454da39ecfbd3ce7e740",
                "md5": "1b60ac17128cba8a16647c203587c04a",
                "sha256": "96d0e4dbd2e398fbd1a9b93b618540a1f3894176dfefcdde4e205f4dfdae6832"
            },
            "downloads": -1,
            "filename": "days360-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "1b60ac17128cba8a16647c203587c04a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 3591,
            "upload_time": "2023-07-14T13:38:50",
            "upload_time_iso_8601": "2023-07-14T13:38:50.266294Z",
            "url": "https://files.pythonhosted.org/packages/97/ea/c9d4bdd10671f97d96c7e700635ac90899be410c454da39ecfbd3ce7e740/days360-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-14 13:38:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tfeldmann",
    "github_project": "days360",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "days360"
}
        
Elapsed time: 0.57506s