Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Daycount methods to compute date differences in year units

Project description

Build Status Binder

yearfrac

Table of Contents

Installation

The yearfrac git repo is available as PyPi package

pip install yearfrac

Usage

Check the examples folder for notebooks.

Functions

  • isaleapyear -- Check if a year is leap year
  • eastersunday -- Determine day and month of an Easter Sunday for a given year
  • jd_to_date and date_to_jd -- Julian Day number conversion
  • act_afb -- Actual/Actual AFB
  • act_isda -- Actual/Actual ISDA
  • d30360e -- 30E/360 ISDA daycount method
  • d30365 -- 30/365 daycount method
  • yearfrac -- Wrapper for all daycount methods

Commands

  • Check syntax: flake8 --ignore=F401
  • Run Unit Tests: python -W ignore -m unittest discover
  • Remove .pyc files: find . -type f -name "*.pyc" | xargs rm
  • Remove __pycache__ folders: find . -type d -name "__pycache__" | xargs rm -rf
  • Upload to PyPi with twine: python setup.py sdist && twine upload -r pypi dist/*

Support

Please open an issue for support.

Contributors

Please contribute using Github Flow. Create a branch, add commits, and open a pull request.

Project details


Download files

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

Files for yearfrac, version 0.4.2
Filename, size File type Python version Upload date Hashes
Filename, size yearfrac-0.4.2.tar.gz (6.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page