PHPackages                             vaibhavpandeyvpz/samay - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. vaibhavpandeyvpz/samay

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

vaibhavpandeyvpz/samay
======================

A lightweight, PSR-20 compliant clock library with zero dependencies other than the PSR-20 interface.

1.0.0(6mo ago)2634MITPHPPHP ^8.2CI passing

Since Dec 28Pushed 6mo agoCompare

[ Source](https://github.com/vaibhavpandeyvpz/samay)[ Packagist](https://packagist.org/packages/vaibhavpandeyvpz/samay)[ Docs](https://github.com/vaibhavpandeyvpz/samay)[ RSS](/packages/vaibhavpandeyvpz-samay/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (2)Versions (2)Used By (4)

Samay
=====

[](#samay)

[![Latest Version](https://camo.githubusercontent.com/ed769a985039dc5f5c108323ce571f6196519ddebb22c0a1e8f6e2790eddc2cd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7661696268617670616e64657976707a2f73616d61792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vaibhavpandeyvpz/samay)[![Downloads](https://camo.githubusercontent.com/c18222449813341a910091663685611499ffc275f8fe3e33e51ead894a01c626/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7661696268617670616e64657976707a2f73616d61792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vaibhavpandeyvpz/samay)[![PHP Version](https://camo.githubusercontent.com/8abbdee866ea41f06aa6808e656e00d63100fb549ef6d93d1e81e378f09b8282/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7661696268617670616e64657976707a2f73616d61792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vaibhavpandeyvpz/samay)[![License](https://camo.githubusercontent.com/c4be95b7f463212f3b47a6502fd7895f6507c1c32687365c9e7b938ea2c88519/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7661696268617670616e64657976707a2f73616d61792e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build Status](https://camo.githubusercontent.com/7108c10ef6e81abd35a8550d064c658ac25a83027adcd830a1110c32f4fd2838/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7661696268617670616e64657976707a2f73616d61792f74657374732e796d6c3f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://github.com/vaibhavpandeyvpz/samay/actions)

A lightweight, [PSR-20](https://www.php-fig.org/psr/psr-20/) compliant clock library with zero dependencies other than the PSR-20 interface.

> **Samay** (`समय`) - Sanskrit for "Time", representing the flow of moments and the measurement of temporal events.

Features
--------

[](#features)

- ✅ **PSR-20 Compliant** - Full implementation of the PSR-20 ClockInterface specification
- ✅ **Zero Dependencies** - Only requires PSR-20 interface (psr/clock)
- ✅ **System Clock** - Get current system time with microsecond precision
- ✅ **Local Clock** - Timezone-aware clock for specific timezones
- ✅ **UTC Clock** - Convenient UTC timezone clock
- ✅ **Frozen Clock** - Deterministic clock for testing scenarios
- ✅ **Modern PHP** - Built for PHP 8.2+ with modern language features
- ✅ **100% Test Coverage** - Fully tested with comprehensive test suite

Installation
------------

[](#installation)

Install via Composer:

```
composer require vaibhavpandeyvpz/samay
```

Quick Start
-----------

[](#quick-start)

```
