2017 © Pedro Peláez
 

library loan-payment-period

[Loan payment period calculation library]

image

kaurikk/loan-payment-period

[Loan payment period calculation library]

  • Friday, April 28, 2017
  • by kaurikk
  • Repository
  • 0 Watchers
  • 0 Stars
  • 64 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Build Status Scrutinizer Code Quality Code Coverage SensioLabsInsight, (*1)

loan-payment-period

Library to generate loan payment periods based on payment schedule. Contains 3 main parts:, (*2)

  • PaymentPeriodsFactory - generates payment periods based on payment schedule
  • PaymentPeriods - holds payment periods collection
  • Period - single period

Basic usage

See more about PaymentSchedule., (*3)

$paymentPeriods = PaymentPeriodsFactory::generate($paymentSchedule);

// How many periods are in collection
$numberOfPayments = $paymentPeriods->getNoOfPeriods();

// Get array of Periods from collection
$periods = $paymentPeriods->getPeriods();


// Get first period from Periods array
$firstPeriod = current($periods);

// Period start date
$firstPeriod->getStart();
// Period end date
$firstPeriod->getEnd();

Periods can have two different type of length: * Average: for monthly payements it's 30 * Exact: exact different between start and end of period (from 28 to 31 or even more is adjusting logic is used), (*4)

// How long is period - average (days)
$firstPeriod->getAvgLength();

// How long is period - exact (days)
$firstPeriod->getExactLength();

The Versions

28/04 2017

dev-master

9999999-dev

[Loan payment period calculation library]

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kauri Kont-Kontson

28/04 2017

0.0.2

0.0.2.0

[Loan payment period calculation library]

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kauri Kont-Kontson

20/04 2017

0.0.1

0.0.1.0

[Loan payment period calculation library]

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kauri Kont-Kontson