Simple functions for time manipulation

1.1.0 2023-05-28 15:45 UTC

This package is auto-updated.

Last update: 2024-04-28 17:36:01 UTC


README

Simple functions for time conversions.

Usage

use cjrasmussen\Time\Convert;

$time = Convert::secondsToTime(153);
echo $time; // 00:02:33

$seconds = Convert::timeToSeconds('01:45:32');
echo $seconds; // 6332

Installation

Simply add a dependency on cjrasmussen/time to your composer.json file if you use Composer to manage the dependencies of your project:

composer require cjrasmussen/time

Although it's recommended to use Composer, you can actually include the file(s) any way you want.

License

Time is MIT licensed.