Giter Club home page Giter Club logo

xldate's People

Contributors

quantdevhacks avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

tanvirss13

xldate's Issues

Update and run tests using Catch2 test utility

Under the Tests folder are some test functions that were written for a previous Date class (not based on the C++20 date namespace) and day counts.

You should first update the Catch.hpp file; this contains all the test functions in Catch2, implemented as template functions. See https://github.com/catchorg/Catch2/blob/master/README.md for more information. You will only need to download the Catch.hpp file, but there is a tutorial and more information on their GitHub site.

Next, you can use the old tests, in the DateTests folder of this repository, and modify them if you like, to write new tests with the same coverage. With the day count tests, however, you will need to check against the specifications of each day count convention, and not vs Excel, for the 30/360 tests. Act/360 and Act/365 should match with Excel. We will also need to add new tests for each new piece of functionality.

The two 30/360 conventions are:
a) ISDA 30/360
b) EUR 30/360

The definitions are given in the links provided in the comments inside the source code.

Implement the XLDate::weekday() function

In the XLDate class implementation, implement the weekday() function. It has already been declared in the .h file.

It should return a bool true if the date is on a weekday, and false otherwise. You can use the dayOfWeek() function to check the day of week, and condition the state on its result.

Implement XLDate::dayOfWeek() function

In the XLDate class implementation, implement the dayOfWeek() function. It is already declared in the header file. It should return an integer value, either 0 through 6, or 1 through 7, representing the day of the week (eg Tues). It is not clear which index applies; you will need to look through the date.h file (C++20) to try to figure this out.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.