1. Go to this page and download the library: Download dcaswel/time-converter 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/ */
dcaswel / time-converter example snippets
//One day's worth of seconds
$ttl = 24 * 60 * 60;
use Dcaswel\TimeConverter\TimeConverter;
$ttl = TimeConverter::convert()->oneDay()->toSeconds();
/**
* Methods to set the time being converted
*/
public function minutes(int $number)
public function hours(int $number)
public function days(int $number)
public function weeks(int $number)
public function months(int $number)
public function years(int $number)
/**
* Methods to get the number you want to convert to
*/
public function toSeconds(): int|float
public function toMinutes(): int|float
public function toHours(): int|float
public function toDays(): int|float
public function toWeeks(): int|float
public function toMonths(): int|float
public function toYears(): int|float
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.