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-10-11 15:27:51 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')