freshbrewedweb / php-timecode
Easy management of timecodes
Installs: 27
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/freshbrewedweb/php-timecode
This package is auto-updated.
Last update: 2025-09-29 02:00:26 UTC
README
Easy management of timecodes
Usage
$timecode = new Timecode(1122 , 'seconds'); echo $timecode->get(); // 00:18:42.000 // Get is optional, you can just echo the object. echo $timecode ->setUnits(['minutes', 'seconds', 'milliseconds']) ->setFormat('%02d:%02d,%02d'); // 18:42,000 echo $timecode->hours; // 0 echo $timecode->minutes; // 18 echo $timecode->seconds; // 42
We can go the other direction too:
$timecode = Timecode::fromString('00:18:42.000');