Skip to main content

Excel's DAYS360() formula for python.

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

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.2.tar.gz (3.6 kB view hashes)

Uploaded Source

Built Distribution

days360-1.0.2-py3-none-any.whl (4.2 kB view hashes)

Uploaded Python 3

Supported by

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