Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/navarr/wall-clock
PSR-20 implementation of a Wall (System) Clock
https://github.com/navarr/wall-clock
Last synced: about 6 hours ago
JSON representation
PSR-20 implementation of a Wall (System) Clock
- Host: GitHub
- URL: https://github.com/navarr/wall-clock
- Owner: navarr
- License: mit
- Created: 2021-08-29T20:02:33.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-11T13:52:39.000Z (10 months ago)
- Last Synced: 2024-05-01T19:32:18.130Z (6 months ago)
- Language: PHP
- Size: 17.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Wall Clock (PSR-20)
[![Latest Stable Version](http://poser.pugx.org/navarr/wall-clock/v)](https://packagist.org/packages/navarr/wall-clock)
[![Total Downloads](http://poser.pugx.org/navarr/wall-clock/downloads)](https://packagist.org/packages/navarr/wall-clock)
[![Latest Unstable Version](http://poser.pugx.org/navarr/wall-clock/v/unstable)](https://packagist.org/packages/navarr/wall-clock)
[![License](http://poser.pugx.org/navarr/wall-clock/license)](https://packagist.org/packages/navarr/wall-clock)
![Tests](https://github.com/navarr/wall-clock/actions/workflows/commit.yml/badge.svg)
![Code Coverage](https://codecov.io/gh/navarr/wall-clock/branch/main/graph/badge.svg?token=BHTKOZZDR3)
[![Mutation Score](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fnavarr%2Fwall-clock%2Fmain)](https://dashboard.stryker-mutator.io/reports/github.com/navarr/wall-clock/main)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
```php
use Navarr\WallClock\WallClock;$clock = new WallClock();
$clock->now()->format('Y-m-d H:i:s') === date('Y-m-d H:i:s')
```