Download the PHP package gamez/duration without Composer
On this page you can find all versions of the php package gamez/duration. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download gamez/duration
More information about gamez/duration
Files in gamez/duration
Download gamez/duration
More information about gamez/duration
Files in gamez/duration
Vendor gamez
Package duration
Short Description Working with durations made easy
License MIT
Homepage https://github.com/jeromegamez/duration-php
Package duration
Short Description Working with durations made easy
License MIT
Homepage https://github.com/jeromegamez/duration-php
Please rate this library. Is it a good library?
Informations about the package duration
Duration for PHP
Working with durations made easy.
Do you like to use DateInterval
to compute and work with durations? Me neither, so let's fix that!
- Installation
- Reference
- Supported Input Values
- Transformations
- Comparisons
- Operations
- Roadmap
Installation
You can install the package with Composer:
You can then use Duration:
Reference
Supported input values
DateIntervals
Colon notation
Textual notation
A textual notation is any value that can be processed by DateInterval::createFromDateString()
Transformations
When transformed, a Duration will be
- converted to a DateInterval representation
- optimized in the sense that an input value of 60 seconds would result in an output value of "1 minute", for example "PT60S" would be converted to "PT1H"
Comparisons
Operations
Results will always be rounded by the second.
Roadmap
- Support more input formats
- Add "output for humans" (like colon notation)
- Support precision (similar to spatie/period)
- ...
All versions of duration with dependencies
PHP Build Version
Package Version
Requires
php Version
^7.3.4|^8.0
The package gamez/duration contains the following files
Loading the files please wait ....