Installation
System Requirements
PHP >= 8.4 is required but the latest stable version of PHP is recommended.
Installation
Tokei is available on Packagist and can be installed using Composer:
composer require bakame/tokei
You MAY need:
- The
ext-intlextension or use a polyfill forIntlDateFormatterto be able to get the locale string version of the time.
Principles
The framework-agnostic package offers a consistent and expressive way to work with temporal values in a safe and predictable manner.
The package comes with the following Temporal classes under the Bakame\Tokei namespace:
Temporal Values
Annotation Values
Annotated Temporal Values
See also: Accepted Input Types for how values are converted between temporal representations.
Annotated temporal values extend the core temporal primitives by associating identifiers with them while preserving the same temporal semantics.
| Primitives | Annotated Values |
|---|---|
| Time | Event |
| Interval | Task |
| IntervalSet | TaskSet |
- Learn
Time,Duration,Interval,IntervalSetfirst. Event,TaskandTaskSetare enrichments, not separate models.- Temporal logic lives in the primitives.
- Annotated values mostly add identification and context.