Skip to content

Commit

Permalink
– updated the README to include the SimpleDiscountCalculator reference
Browse files Browse the repository at this point in the history
  • Loading branch information
uruba committed Sep 25, 2015
1 parent 1fd6394 commit 217cd88
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ A lightweight, simple and easy PHP library for calculating annuities (e.g., mort

## Features
* Simple interest calculator
* Simple discount calculator
* Annuity present and future value calculator
* Debt amortization calculator
* Bond fair value calculator
Expand Down Expand Up @@ -506,6 +507,33 @@ namespace `FinanCalc\Calculators\Factories`

* * *

### SimpleDiscountCalculator
namespace `FinanCalc\Calculators`
* **__construct($amountDue, $annualDiscountRate, TimeSpan $time)**
* *$principal* = **'S'** – amount due
* *$annualInterestRate* = **'d'** – annual discount rate (i.e., a decimal number typically lower than 1 and greater than 0)
* *$time* = (converted to years) **'t'** – the total time as a TimeSpan object

##### Setters
* **setAmountDue($amountDue)** – sets S
* **setAnnualDiscountRate($annualDiscountRate)** – sets d
* **setTime(TimeSpan $time)** – sets the total time

##### Getters
* **getAmountDue()** – gets S
* **getAnnualDiscountRate()** – gets d
* **getTime()** – gets the total time as a TimeSpan object
* **getTimeInYears()** – gets the total time in years
* **getTimeInMonths()** – gets the total time in months
* **getTimeInDays()** – gets the total time in days
* **getDiscountAmount()** – gets the discount amount ('D')

#### SimpleDiscountCalculatorFactory (*SimpleDiscountCalculator's factory object*)
namespace `FinanCalc\Calculators\Factories`
* **newSimpleDiscount($amountDue, $annualDiscountRate, TimeSpan $time)**

* * *

### SimpleInterestCalculator
namespace `FinanCalc\Calculators`
* **__construct($principal, $annualInterestRate, TimeSpan $time)**
Expand Down

0 comments on commit 217cd88

Please sign in to comment.