PHPackages                             fredbradley/easytime - 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. fredbradley/easytime

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

fredbradley/easytime
====================

A small class based package to help with human readable calculations of time.

v3.0.8(2y ago)3881MITPHPPHP ^8.1

Since Apr 9Pushed 2y ago1 watchersCompare

[ Source](https://github.com/fredbradley/easytime)[ Packagist](https://packagist.org/packages/fredbradley/easytime)[ GitHub Sponsors](https://github.com/fredbradley)[ RSS](/packages/fredbradley-easytime/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (10)Dependencies (3)Versions (28)Used By (1)

Easy Time
=========

[](#easy-time)

[![Latest Version on Packagist](https://camo.githubusercontent.com/2ce9806face8f0cc73172d8d3bff0b59589491e35b171c1ffcffc0422386f4fc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f66726564627261646c65792f6561737974696d652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/fredbradley/easytime)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/8bdb982b8dd574d05ef8371ee7a51f28f7269caac23c5de115552bc78c7b6f43/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f66726564627261646c65792f6561737974696d652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/fredbradley/easytime)[![Tests Passing](https://github.com/fredbradley/easytime/workflows/Tests/badge.svg)](https://github.com/fredbradley/easytime/workflows/Tests/badge.svg)

A small class based package to help with human-readable calculations of time.

For when you need to convert a human-readable number of minutes or seconds into an integer of seconds (for example expiry time on a Cache object)

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

[](#installation)

You can install the package via composer:

```
composer require fredbradley/easytime
```

Usage Examples
--------------

[](#usage-examples)

```
use FredBradley\EasyTime\EasySeconds;

$seconds = EasySeconds::AN_HOUR; // returns 3600
$seconds = EasySeconds::hours(2); // return 7200

// Want to know how many minutes in a year?
$minutes = EasyMinutes::A_YEAR;

// And if you want to you can mix them together...
$seconds = EasySeconds::minutes(EasyMinutes::AN_HOUR); // return 3600

// Number of Seconds in a given month?
$minutes = EasyMinutes::days(EasyDays::month('january'));

// Leap Years? Yep..
$minutes = EasyMinutes::days(EasyDays::month('february', true)); // where the second variable is a boolean for a leap year
```

Pull requests open for people who find this useful and want to build more.

Testing
-------

[](#testing)

(100% Code Coverage)

```
composer test
```

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Fred Bradley](https://github.com/fredbradley)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~33 days

Recently: every ~0 days

Total

27

Last Release

1004d ago

Major Versions

v0.0.1 → v1.0.02021-04-09

v1.0.8 → v2.0.02022-04-13

v2.0.7 → v3.0.02023-08-17

PHP version history (3 changes)v0.0.1PHP ^7.4|^8.0

v2.0.0PHP ^8.0

v3.0.0PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1639226?v=4)[Fred Bradley](/maintainers/fredbradley)[@fredbradley](https://github.com/fredbradley)

---

Top Contributors

[![fredbradley](https://avatars.githubusercontent.com/u/1639226?v=4)](https://github.com/fredbradley "fredbradley (26 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/fredbradley-easytime/health.svg)

```
[![Health](https://phpackages.com/badges/fredbradley-easytime/health.svg)](https://phpackages.com/packages/fredbradley-easytime)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
