2017 © Pedro Peláez
 

library fertility-calculator

Fertility Calculator

image

redzjovi/fertility-calculator

Fertility Calculator

  • Tuesday, May 15, 2018
  • by redzjovi
  • Repository
  • 1 Watchers
  • 0 Stars
  • 28 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 12 % Grown

The README.md

Synopsis

PHP fertility calculator., (*1)

Installation

composer require redzjovi/fertility-calculator

How to use

use redzjovi\fertility\FertilityCalculator;

/**
 * example calculate('2017-12-18', 20)
 * return [
 *      '0' => [background_color => '#e9f6da', 'class_name' => ['fertile', 'fertile-check'], date' => '2017-12-18'],
 *      '1' => [background_color => '#ddefc8', 'class_name' => ['fertile', 'fertile-check'], 'date' => '2017-12-19'],
 *      '2' => [background_color => '#d4ebb8', 'class_name' => ['fertile', 'fertile-check'], 'date' => '2017-12-20'],
 *      '3' => [background_color => '#c0e496', 'class_name' => ['fertile', 'fertile-check'], 'date' => '2017-12-21'],
 *      '4' => [background_color => '#99d453', 'class_name' => ['fertile', 'fertile-love'], 'date' => '2017-12-22'],
 *      '5' => [background_color => '#c0e496', 'class_name' => ['fertile', 'fertile-check'], 'date' => '2017-12-23'],
 * ];

 * @param date $lastPeriod
 * @param integer $lengthCycle
 * @return array $dates
 */
$fertilicyCalculator = new FertilityCalculator();
$dates = $fertilicyCalculator->calculate(date('Y-m-d'), 25);

var_dump($track);

The Versions

15/05 2018

dev-master

9999999-dev

Fertility Calculator

  Sources   Download

The Requires