php-duration icon indicating copy to clipboard operation
php-duration copied to clipboard

Convert durations of time between colon-formatted, human-readable, and seconds

Results 7 php-duration issues
Sort by recently updated
recently updated
newest added

i would expect that `zeroFill` param on `formatted` method fills hours segment also: ```php $duration = new \Khill\Duration\Duration(4265); dump($duration->formatted(null, true)); // returns: 1:11:05 instead of 01:11:05 ```

i'm using PHP8 ```php use Khill\Duration\Duration; $duration = new Duration('7:31'); dump($duration->humanize()); // returns '7m 31s' dump($duration->toSeconds()); // returns 0.0 instead of 451.0 ```

I have a network router which reports its uptime like `2w5d2h16m59s`. I'm looking to convert it to seconds to use in monitoring systems, like Zabbix. Any chance of making this...

enhancement

- Use laravel/pint for code style fixes - Drop support PHP 7 below - Use Pest for testing - Use stable phpstan - Add github actions - Replace travis with...

With this change files from tests/phpstan/phpunit/CI/etc will NOT be added to archive, so projects that depends on this package will NOT have unneeded files. Article from PHP.watch about .gitattributes -...