redmatter / chrono
Accurate, testable and consistent API for clocks and times
Requires
- php: >=5.4.0
- ext-bcmath: *
- symfony/polyfill-php70: ^1.18
- symfony/polyfill-php73: ^1.18
Requires (Dev)
- phpunit/phpunit: ^4
- symfony/polyfill-php72: ^1.18
- victorjonsson/markdowndocs: ^1.3
This package is auto-updated.
Last update: 2024-10-29 06:18:38 UTC
README
Clock and time utilities with focus on accuracy and testability.
The design is influenced by chrono
library in C++ and time.Duration
library in golang.
The one reason, if you need convincing, to use this library would be to enhance the testability of your code that relies on system-time. See examples.
API Reference
Documentation can be found here.
How to contribute?
Please feel free to fork and submit a pull request. Bug fixes, improvements, unit-tests and usability comments are most welcome.
If you are to contribute code, please do log an issue before starting to work on the code. Your changes should come with working unit tests; all tests must pass.
Coding standard followed here is PSR-2
.
License
This library is licensed under MIT license.