Skip to main content

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

Project description

days360

Tests

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

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 and PSA methods.

Notes and credits

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

days360-1.0.0.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

days360-1.0.0-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file days360-1.0.0.tar.gz.

File metadata

  • Download URL: days360-1.0.0.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Darwin/22.5.0

File hashes

Hashes for days360-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5b76cd6b46c6d725d3f86a1a8ecc65bfeb28a32c6580a34f5e779414e10f3c59
MD5 2af5260c0a5d49f8d76bcf866e64a91f
BLAKE2b-256 88ef380a8e0565dd580398c1dbd57ba94e1f71fad7c3dd7e5a1f7ba53e996087

See more details on using hashes here.

File details

Details for the file days360-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: days360-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Darwin/22.5.0

File hashes

Hashes for days360-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3f2ee72dd36249fb3529731bf0810e4a3cb9e1a60d1ee95dbd08bf731b8fe737
MD5 bbed37f9cef1e86aed48e04ba12aeb01
BLAKE2b-256 ecd232a9a6bf3cde7b915de63e372456faaa1b9da04e9663bd0e4443078c4db8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page