PHP code example of jizuscreed / time-approximator
1. Go to this page and download the library: Download jizuscreed/time-approximator library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jizuscreed / time-approximator example snippets
$timeApproximator = new jizuscreed\TimeApproximator\TimeApproximator(new \jizuscreed\TimeApproximator\Languages\Russian());
$this->timeApproximator->getDescriptionFor(20); // полминуты
$this->timeApproximator->getDescriptionFor(40); // меньше чем 1 минута
$this->timeApproximator->getDescriptionFor(16*60); // 16 минут
$this->timeApproximator->getDescriptionFor(11*60); // 11 минут
$this->timeApproximator->getDescriptionFor(46*60); // примерно 1 час
$this->timeApproximator->getDescriptionFor(43*60); // 43 минуты
$this->timeApproximator->getDescriptionFor(68*60); // примерно 1 час
$this->timeApproximator->getDescriptionFor(24*60*60*15+23*60*60+15*600; // 16 дней)