CONTRIBUTING.md

General guidelines

This will provide you with contribution guidelines. You can contribute in two ways:

  1. Raising a bug report or making a feature request in an issue
  2. Suggesting a change by submitting a pull request. Specific suggestions are described below.

Issues

Pull requests

Workflow

Specific guidelines

Here are a few suggestions for how you can contribute to this package.

Calendars

A number calendars are pre-canned as part of this package. However, we could always do with more. To do this, you will need to:

  1. Implement a constructor function such as <LocationCode>Calendar() <- Calendar("<LocationCode>", "<Olson>/<TimeZone>"). This function will create an instance of the corresponding Calendar subclass. See ?Calendar for further information.
  2. Implement a method for is_good() that dispatches on the Calendar subclass that you have implemented.

Day basis conventions

You can implement new day basis conventions and their corresponding year fraction calculators by:

  1. Defining a string to denote the corresponding day basis convention (e.g. "act/365")
  2. Add this string to the list of valid day basis conventions in is_valid_day_basis()
  3. Implement a vectorised function that calculates the years between two dates (e.g. thirty_360())
  4. Call this function from year_frac() making sure that you preserve its vectorised nature.


imanuelcostigan/fmdates documentation built on March 24, 2020, 8:54 p.m.