PHPackages                             webignition/readable-duration - 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. webignition/readable-duration

ActiveLibrary

webignition/readable-duration
=============================

Convert a value in seconds into a human-readable convenience duration

2.1(7y ago)768.0k↓41.7%2MITPHPPHP &gt;=7.2

Since Mar 28Pushed 7y ago2 watchersCompare

[ Source](https://github.com/webignition/readable-duration)[ Packagist](https://packagist.org/packages/webignition/readable-duration)[ Docs](https://github.com/webignition/readable-duration)[ RSS](/packages/webignition-readable-duration/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (3)Versions (7)Used By (2)

readable-duration
=================

[](#readable-duration)

Ever wondered how long a value in seconds might be in units that your human brain can more comfortably understand?

Now you can convert a value in seconds into a human-readable convenience duration!

Features:

- Get the number of years, months, days, hours, minutes and seconds for a given value
- Get a value in seconds in years, months, days, hours, minutes or seconds
- Get a value in seconds as the most appropriate human-readable value

Get the number of years, months, days, hours, minutes and seconds for a given value
-----------------------------------------------------------------------------------

[](#get-the-number-of-years-months-days-hours-minutes-and-seconds-for-a-given-value)

```
