navarr / wall-clock
PSR-20 implementation that returns the current wall (system) time
Fund package maintenance!
navarr
v1.0.0
2022-11-26 18:36 UTC
Requires
- php: ^8
- psr/clock: ^1
Requires (Dev)
- infection/infection: ^0.26.0
- jetbrains/phpstorm-attributes: ^1.0
- phpstan/phpstan: ^1
- phpunit/phpunit: ^9.5
- roave/security-advisories: dev-master
- squizlabs/php_codesniffer: ^3.6
Provides
This package is auto-updated.
Last update: 2024-11-11 15:44:37 UTC
README
This library contains an implementation of PSR-20 that provides a new DateTimeImmutable instance everytime its called
Installation
composer require navarr/wall-clock:^1
Usage
use Navarr\WallClock\WallClock; $clock = new WallClock(); $clock->now()->format('Y-m-d H:i:s') === date('Y-m-d H:i:s')