Download the PHP package vovke/loan-payments-calculator without Composer
On this page you can find all versions of the php package vovke/loan-payments-calculator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package loan-payments-calculator
LoanPaymentsCalculator
LoanPaymentsCalculator is a programmer-oriented library for PHP. It is created to provide Loan Payment Schedules for various inputs and strategies. Mainly developed for the short term loans it can be used for any other loan types as well.
Installation
You may use Composer to download and install LoanPaymentsCalculator as well as its dependencies.
Standards
All the dates meet ISO 8601
standard, Y-m-d
(YYYY-MM-DD)
Components
DateProvider
We use it to provide closest date that suits specific rules, for example, first day of month
, not bank holiday
and etc.
HolidayProvider
an Interface for checking if the specific date is a bank holiday. Used for period
calculation in Schedule
.
Period
Period
class is used to provide an object representing a time frame where needed, it contains start and end date for the specific period and the amount of days between those.
We use it as a container to describe the Loan period, where startDate
is the day when Loan will potentially get issued, and endDate is the date of the last repayment, we also use period for each of the Loan's payments and in that case endDate is the date of the payment's repayment.
Schedule
Schedule
class is used to generate periods
for the given loan period
, number of payments and payment frequency.
PaymentScheduleCalculator
PaymentScheduleCalculator
interface is a contract for implementing different ways of payments calculations.
EqualPrincipalPaymentScheduleCalculator
EqualPrincipalPaymentScheduleCalculator
is the simplest implementation of PaymentScheduleCalculator
interface, generates payments with equal principal amount.
AnnuityPaymentScheduleCalculator
AnnuityPaymentScheduleCalculator
generates payments with equal payments amount.
License
Released under the terms of the MIT License.