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 details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: days360-1.0.2.tar.gz
  • Upload date:
  • Size: 3.6 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.2.tar.gz
Algorithm Hash digest
SHA256 96d0e4dbd2e398fbd1a9b93b618540a1f3894176dfefcdde4e205f4dfdae6832
MD5 1b60ac17128cba8a16647c203587c04a
BLAKE2b-256 97eac9d4bdd10671f97d96c7e700635ac90899be410c454da39ecfbd3ce7e740

See more details on using hashes here.

File details

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

File metadata

  • Download URL: days360-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.2 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b3bdcce8f3ca2b046f5e63015a878bf56a560fe6fcaae657a399c3d6342232fc
MD5 bd038fc2a3875fd58b11b1277b52b36c
BLAKE2b-256 fe47ec18e652c92c06d518f75819e4e09f97b841d19d21879d709c49fa53946c

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