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

This package is auto-updated.

Last update: 2024-11-11 15:44:37 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License
Tests Code Coverage Mutation Score

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')