PHPackages                             bagf/juration-php - 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. bagf/juration-php

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

bagf/juration-php
=================

Duration string to time in seconds parser

0.0.1(9y ago)0781PHP

Since May 27Pushed 9y ago1 watchersCompare

[ Source](https://github.com/bagf/juration-php)[ Packagist](https://packagist.org/packages/bagf/juration-php)[ RSS](/packages/bagf-juration-php/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (1)Versions (2)Used By (1)

Juration PHP Library
====================

[](#juration-php-library)

PHP version of the [Dom Christie's](https://github.com/domchristie) javascript library: [juration-js](https://github.com/domchristie/juration)

This library parses text and extracts the duration as seconds integer but unlike the javascript version it does not use regular expressions to match time patterns so helpful pull requests will be appreciated!

### Installation

[](#installation)

```
composer require bagf/juration-php
```

### Testing

[](#testing)

```
composer install
composer test
```

### Usage

[](#usage)

```
Juration\Juration::parse('2min'); // 120
Juration\Juration::parse('2min and 1hr'); // 3720
Juration\Juration::stringify(12); // 12 secs
Juration\Juration::stringify(184); // 3 mins 4 secs
Juration\Juration::stringify(8400); // 2 hrs 20 mins
Juration\Juration::stringify(15854400); // 6 mths 1 day
```

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

3322d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2567601?v=4)[Rory](/maintainers/bagf)[@bagf](https://github.com/bagf)

---

Top Contributors

[![bagf](https://avatars.githubusercontent.com/u/2567601?v=4)](https://github.com/bagf "bagf (10 commits)")

---

Tags

composer-packageduration-measurementduration-stringnlrphp-library

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bagf-juration-php/health.svg)

```
[![Health](https://phpackages.com/badges/bagf-juration-php/health.svg)](https://phpackages.com/packages/bagf-juration-php)
```

###  Alternatives

[theseer/phpdox

A fast Documentation generator for PHP Code using standard technology (SRC, DOCBLOCK, XML and XSLT) with event based processing

6062.5M150](/packages/theseer-phpdox)[magefan/module-wysiwyg-advanced

Extend TinyMCE 4 in Magento 2

752.5M1](/packages/magefan-module-wysiwyg-advanced)[vimeo/ablincoln

PHP library for designing online experiments

154302.7k](/packages/vimeo-ablincoln)[iamcal/lib_autolink

Adds anchors to urls in a text

621.3M3](/packages/iamcal-lib-autolink)[acsiomatic/device-detector-bundle

Symfony Bundle for https://github.com/matomo-org/device-detector

12202.6k](/packages/acsiomatic-device-detector-bundle)[wearerequired/wp-requirements-check

Simple requirements checking class

1318.0k2](/packages/wearerequired-wp-requirements-check)

PHPackages © 2026

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